diff options
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 14 |
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) | |||
1873 | enum plugin_status plugin_start(const void* parameter) | 1873 | enum plugin_status plugin_start(const void* parameter) |
1874 | { | 1874 | { |
1875 | static char videofile[MAX_PATH]; | 1875 | static char videofile[MAX_PATH]; |
1876 | 1876 | int status = PLUGIN_OK; /* assume success */ | |
1877 | int status = PLUGIN_ERROR; /* assume failure */ | ||
1878 | int result; | 1877 | int result; |
1879 | int err; | 1878 | int err; |
1880 | bool quit = false; | 1879 | bool quit = false; |
@@ -1901,7 +1900,9 @@ enum plugin_status plugin_start(const void* parameter) | |||
1901 | rb->strcpy(videofile, (const char*) parameter); | 1900 | rb->strcpy(videofile, (const char*) parameter); |
1902 | 1901 | ||
1903 | if (stream_init() < STREAM_OK) { | 1902 | if (stream_init() < STREAM_OK) { |
1903 | /* Fatal because this should not fail */ | ||
1904 | DEBUGF("Could not initialize streams\n"); | 1904 | DEBUGF("Could not initialize streams\n"); |
1905 | status = PLUGIN_ERROR; | ||
1905 | } else { | 1906 | } else { |
1906 | while (!quit) | 1907 | while (!quit) |
1907 | { | 1908 | { |
@@ -1927,10 +1928,11 @@ enum plugin_status plugin_start(const void* parameter) | |||
1927 | rb->lcd_update(); | 1928 | rb->lcd_update(); |
1928 | 1929 | ||
1929 | save_settings(); | 1930 | save_settings(); |
1930 | status = PLUGIN_OK; | ||
1931 | 1931 | ||
1932 | mpeg_menu_sysevent_handle(); | 1932 | mpeg_menu_sysevent_handle(); |
1933 | } else { | 1933 | } else { |
1934 | /* Problem with file; display message about it - not | ||
1935 | * considered a plugin error */ | ||
1934 | DEBUGF("Could not open %s\n", videofile); | 1936 | DEBUGF("Could not open %s\n", videofile); |
1935 | switch (err) | 1937 | switch (err) |
1936 | { | 1938 | { |
@@ -1942,7 +1944,11 @@ enum plugin_status plugin_start(const void* parameter) | |||
1942 | } | 1944 | } |
1943 | 1945 | ||
1944 | rb->splashf(HZ*2, errstring, err); | 1946 | rb->splashf(HZ*2, errstring, err); |
1945 | status = PLUGIN_ERROR; | 1947 | |
1948 | if (settings.play_mode != 0) { | ||
1949 | /* Try the next file if the play mode is not single play */ | ||
1950 | next_action = VIDEO_NEXT; | ||
1951 | } | ||
1946 | } | 1952 | } |
1947 | 1953 | ||
1948 | /* return value of button_loop says, what's next */ | 1954 | /* return value of button_loop says, what's next */ |