summaryrefslogtreecommitdiffstats
path: root/apps/plugins/mpegplayer/mpegplayer.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-12-19 03:28:43 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-12-19 03:28:43 +0000
commitfd01bf3e4cfedf073824b1a98662932796b6cd32 (patch)
tree34298aa2a90842c9c73212d5eaf8f5eb9f5d873a /apps/plugins/mpegplayer/mpegplayer.c
parent6b1fcc67c221a021d073394566f4edd58103d661 (diff)
downloadrockbox-fd01bf3e4cfedf073824b1a98662932796b6cd32.tar.gz
rockbox-fd01bf3e4cfedf073824b1a98662932796b6cd32.tar.bz2
rockbox-fd01bf3e4cfedf073824b1a98662932796b6cd32.zip
MPEGPlayer: Skip to next file when there is a problem with a video file in all-play mode, otherwise exit as usual. Only consider failures such as engine init issues or no file to view to be a plugin error but not problems with the video files themselves; the user is adequately informed already.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28854 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpegplayer.c')
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index f130760ff2..7a2b457aec 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -1873,8 +1873,7 @@ static int button_loop(void)
enum plugin_status plugin_start(const void* parameter)
{
static char videofile[MAX_PATH];
-
- int status = PLUGIN_ERROR; /* assume failure */
+ int status = PLUGIN_OK; /* assume success */
int result;
int err;
bool quit = false;
@@ -1901,7 +1900,9 @@ enum plugin_status plugin_start(const void* parameter)
rb->strcpy(videofile, (const char*) parameter);
if (stream_init() < STREAM_OK) {
+ /* Fatal because this should not fail */
DEBUGF("Could not initialize streams\n");
+ status = PLUGIN_ERROR;
} else {
while (!quit)
{
@@ -1927,10 +1928,11 @@ enum plugin_status plugin_start(const void* parameter)
rb->lcd_update();
save_settings();
- status = PLUGIN_OK;
mpeg_menu_sysevent_handle();
} else {
+ /* Problem with file; display message about it - not
+ * considered a plugin error */
DEBUGF("Could not open %s\n", videofile);
switch (err)
{
@@ -1942,7 +1944,11 @@ enum plugin_status plugin_start(const void* parameter)
}
rb->splashf(HZ*2, errstring, err);
- status = PLUGIN_ERROR;
+
+ if (settings.play_mode != 0) {
+ /* Try the next file if the play mode is not single play */
+ next_action = VIDEO_NEXT;
+ }
}
/* return value of button_loop says, what's next */