diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-12-10 08:57:10 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-12-10 08:57:10 +0000 |
commit | 8cfbd3604fac14f629244e521ad24ffa9938c790 (patch) | |
tree | 16dc096519b8b537bb7d4b73e0c97f5f33ee752b /apps/plugins/mpegplayer/video_thread.c | |
parent | 40ff47c7eea41ac893d7af5c5b97ace52a5ffade (diff) | |
download | rockbox-8cfbd3604fac14f629244e521ad24ffa9938c790.tar.gz rockbox-8cfbd3604fac14f629244e521ad24ffa9938c790.zip |
Use cookies for thread identification instead of pointers directly which gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/video_thread.c')
-rw-r--r-- | apps/plugins/mpegplayer/video_thread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c index 100904b01b..8b84686a3b 100644 --- a/apps/plugins/mpegplayer/video_thread.c +++ b/apps/plugins/mpegplayer/video_thread.c | |||
@@ -1009,7 +1009,7 @@ bool video_thread_init(void) | |||
1009 | rb->queue_enable_queue_send(video_str.hdr.q, &video_str_queue_send, | 1009 | rb->queue_enable_queue_send(video_str.hdr.q, &video_str_queue_send, |
1010 | video_str.thread); | 1010 | video_str.thread); |
1011 | 1011 | ||
1012 | if (video_str.thread == NULL) | 1012 | if (video_str.thread == 0) |
1013 | return false; | 1013 | return false; |
1014 | 1014 | ||
1015 | /* Wait for thread to initialize */ | 1015 | /* Wait for thread to initialize */ |
@@ -1022,11 +1022,11 @@ bool video_thread_init(void) | |||
1022 | /* Terminates the video thread */ | 1022 | /* Terminates the video thread */ |
1023 | void video_thread_exit(void) | 1023 | void video_thread_exit(void) |
1024 | { | 1024 | { |
1025 | if (video_str.thread != NULL) | 1025 | if (video_str.thread != 0) |
1026 | { | 1026 | { |
1027 | str_post_msg(&video_str, STREAM_QUIT, 0); | 1027 | str_post_msg(&video_str, STREAM_QUIT, 0); |
1028 | rb->thread_wait(video_str.thread); | 1028 | rb->thread_wait(video_str.thread); |
1029 | IF_COP(invalidate_icache()); | 1029 | IF_COP(invalidate_icache()); |
1030 | video_str.thread = NULL; | 1030 | video_str.thread = 0; |
1031 | } | 1031 | } |
1032 | } | 1032 | } |