From 3b1f61a1ff4297e9972b08797495c08dd0c22109 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 29 Dec 2007 22:12:10 +0000 Subject: 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 --- apps/plugins/mpegplayer/stream_mgr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/plugins/mpegplayer/stream_mgr.c') diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index 00b96173b6..06f269ca31 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 } -- cgit v1.2.3