summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-12-29 22:12:10 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-12-29 22:12:10 +0000
commit3b1f61a1ff4297e9972b08797495c08dd0c22109 (patch)
tree7a155ab1c425b9a6aa09b3d333040151492c5bce /apps/plugins/mpegplayer
parentb08409ee40947605382e30f51b2db901210bed1e (diff)
downloadrockbox-3b1f61a1ff4297e9972b08797495c08dd0c22109.zip
rockbox-3b1f61a1ff4297e9972b08797495c08dd0c22109.tar.gz
rockbox-3b1f61a1ff4297e9972b08797495c08dd0c22109.tar.bz2
rockbox-3b1f61a1ff4297e9972b08797495c08dd0c22109.tar.xz
mpegplayer loose ends: Move gray_release to the exit routine where it should be. All gray handling is on CPU except frame rendering.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15979 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r--apps/plugins/mpegplayer/stream_mgr.c6
-rw-r--r--apps/plugins/mpegplayer/video_out_rockbox.c3
-rw-r--r--apps/plugins/mpegplayer/video_thread.c7
3 files changed, 6 insertions, 10 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c
index 00b9617..06f269c 100644
--- a/apps/plugins/mpegplayer/stream_mgr.c
+++ b/apps/plugins/mpegplayer/stream_mgr.c
@@ -1024,6 +1024,7 @@ int stream_init(void)
if (grayscales < 33 || (ssize_t)memsize <= 0)
{
rb->splash(HZ, "graylib init failed!");
+ stream_mgr.graymem = NULL;
return STREAM_ERROR;
}
#endif /* !HAVE_LCD_COLOR */
@@ -1093,4 +1094,9 @@ void stream_exit(void)
rb->thread_wait(stream_mgr.thread);
stream_mgr.thread = NULL;
}
+
+#ifndef HAVE_LCD_COLOR
+ if (stream_mgr.graymem != NULL)
+ gray_release();
+#endif
}
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c
index d5e927e..ff0d39e 100644
--- a/apps/plugins/mpegplayer/video_out_rockbox.c
+++ b/apps/plugins/mpegplayer/video_out_rockbox.c
@@ -398,7 +398,4 @@ bool vo_is_visible(void)
void vo_cleanup(void)
{
vo.visible = false;
-#ifndef HAVE_LCD_COLOR
- gray_release();
-#endif
}
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c
index e69089d..aeaf942 100644
--- a/apps/plugins/mpegplayer/video_thread.c
+++ b/apps/plugins/mpegplayer/video_thread.c
@@ -1030,11 +1030,4 @@ void video_thread_exit(void)
IF_COP(invalidate_icache());
video_str.thread = NULL;
}
- else
- {
- /* Some things were done before thread creation */
-#ifndef HAVE_LCD_COLOR
- gray_release();
-#endif
- }
}