diff options
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_parser.c | 2 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/stream_mgr.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c index 5821bd57ab..1be11a467b 100644 --- a/apps/plugins/mpegplayer/mpeg_parser.c +++ b/apps/plugins/mpegplayer/mpeg_parser.c | |||
@@ -1144,6 +1144,7 @@ int parser_init_stream(void) | |||
1144 | if (!init_video_info()) | 1144 | if (!init_video_info()) |
1145 | { | 1145 | { |
1146 | /* Cannot determine video size, etc. */ | 1146 | /* Cannot determine video size, etc. */ |
1147 | parser_init_state(); | ||
1147 | return STREAM_UNSUPPORTED; | 1148 | return STREAM_UNSUPPORTED; |
1148 | } | 1149 | } |
1149 | 1150 | ||
@@ -1157,6 +1158,7 @@ int parser_init_stream(void) | |||
1157 | if (video_str.start_pts == INVALID_TIMESTAMP) | 1158 | if (video_str.start_pts == INVALID_TIMESTAMP) |
1158 | { | 1159 | { |
1159 | /* Must have video at least */ | 1160 | /* Must have video at least */ |
1161 | parser_init_state(); | ||
1160 | return STREAM_UNSUPPORTED; | 1162 | return STREAM_UNSUPPORTED; |
1161 | } | 1163 | } |
1162 | 1164 | ||
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index 2eed3d355d..b88c6d70c7 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c | |||
@@ -592,7 +592,7 @@ static int stream_on_close(void) | |||
592 | 592 | ||
593 | stream_mgr_lock(); | 593 | stream_mgr_lock(); |
594 | 594 | ||
595 | /* Any open file? */ | 595 | /* Any open file that was accepted for playback? */ |
596 | if (stream_mgr.filename != NULL) | 596 | if (stream_mgr.filename != NULL) |
597 | { | 597 | { |
598 | /* Yes - hide video */ | 598 | /* Yes - hide video */ |
@@ -602,12 +602,13 @@ static int stream_on_close(void) | |||
602 | stream_on_stop(false); | 602 | stream_on_stop(false); |
603 | /* Tell parser file is finished */ | 603 | /* Tell parser file is finished */ |
604 | parser_close_stream(); | 604 | parser_close_stream(); |
605 | /* Close file */ | ||
606 | disk_buf_close(); | ||
607 | /* Reinitialize manager */ | 605 | /* Reinitialize manager */ |
608 | stream_mgr_init_state(); | 606 | stream_mgr_init_state(); |
609 | } | 607 | } |
610 | 608 | ||
609 | /* Let disk buffer reset itself - file might be open even if no good */ | ||
610 | disk_buf_close(); | ||
611 | |||
611 | stream_mgr_unlock(); | 612 | stream_mgr_unlock(); |
612 | 613 | ||
613 | return status; | 614 | return status; |