From 8cfbd3604fac14f629244e521ad24ffa9938c790 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 10 Dec 2008 08:57:10 +0000 Subject: 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 --- apps/plugins/mpegplayer/video_thread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/plugins/mpegplayer/video_thread.c') 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) rb->queue_enable_queue_send(video_str.hdr.q, &video_str_queue_send, video_str.thread); - if (video_str.thread == NULL) + if (video_str.thread == 0) return false; /* Wait for thread to initialize */ @@ -1022,11 +1022,11 @@ bool video_thread_init(void) /* Terminates the video thread */ void video_thread_exit(void) { - if (video_str.thread != NULL) + if (video_str.thread != 0) { str_post_msg(&video_str, STREAM_QUIT, 0); rb->thread_wait(video_str.thread); IF_COP(invalidate_icache()); - video_str.thread = NULL; + video_str.thread = 0; } } -- cgit v1.2.3