summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpeg_parser.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-12-19 02:11:35 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-12-19 02:11:35 +0000
commit6b1fcc67c221a021d073394566f4edd58103d661 (patch)
treef76c8e056d4677dd32a59ddf21878e2b56016e59 /apps/plugins/mpegplayer/mpeg_parser.c
parentb985b4c54bba1482e9517a0a384766f587d59a47 (diff)
downloadrockbox-6b1fcc67c221a021d073394566f4edd58103d661.zip
rockbox-6b1fcc67c221a021d073394566f4edd58103d661.tar.gz
rockbox-6b1fcc67c221a021d073394566f4edd58103d661.tar.bz2
rockbox-6b1fcc67c221a021d073394566f4edd58103d661.tar.xz
MPEGPlayer: Fix leakage of file decriptors if file wasn't accepted by playback engine-- code is now getting tested that couldn't be before. Also reset parser in stream init when it doesn't like the file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28853 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpeg_parser.c')
-rw-r--r--apps/plugins/mpegplayer/mpeg_parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c
index 5821bd5..1be11a4 100644
--- a/apps/plugins/mpegplayer/mpeg_parser.c
+++ b/apps/plugins/mpegplayer/mpeg_parser.c
@@ -1144,6 +1144,7 @@ int parser_init_stream(void)
if (!init_video_info())
{
/* Cannot determine video size, etc. */
+ parser_init_state();
return STREAM_UNSUPPORTED;
}
@@ -1157,6 +1158,7 @@ int parser_init_stream(void)
if (video_str.start_pts == INVALID_TIMESTAMP)
{
/* Must have video at least */
+ parser_init_state();
return STREAM_UNSUPPORTED;
}