summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-28 22:41:18 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-28 22:41:18 +0000
commitd36c1d4295c560215e74453978f8017a6030e52b (patch)
treefec1cc8daa85b7f0e9af1cba04f635f3769ea08c
parent40e1f27cce4ea701deb8c32dd6872d03f55bcbc8 (diff)
downloadmpv-d36c1d4295c560215e74453978f8017a6030e52b.tar.bz2
mpv-d36c1d4295c560215e74453978f8017a6030e52b.tar.xz
sanity checks during codec detection; also reset demuxer->stream->eof
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22059 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/demux_mpg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c
index 6b4a5c4e93..b595ca0074 100644
--- a/libmpdemux/demux_mpg.c
+++ b/libmpdemux/demux_mpg.c
@@ -1059,11 +1059,13 @@ static demuxer_t* demux_mpg_ps_open(demuxer_t* demuxer)
clear_stats();
do {
head=sync_video_packet(demuxer->video);
+ if(!head) break;
update_stats(head);
skip_video_packet(demuxer->video);
- } while(stream_tell(demuxer->stream) < pos + ps_probe);
+ } while(stream_tell(demuxer->stream) < pos + ps_probe && !demuxer->stream->eof);
ds_free_packs(demuxer->video);
+ demuxer->stream->eof=0;
stream_seek(demuxer->stream, pos);
mp_msg(MSGT_DEMUX,MSGL_INFO,"MPEG packet stats: p100: %d p101: %d p1B6: %d p12x: %d sli: %d a: %d b: %d c: %d idr: %d sps: %d pps: %d\n",
num_elementary_packets100, num_elementary_packets101,