[MPlayer-cvslog] r22059 - trunk/libmpdemux/demux_mpg.c

nicodvb subversion at mplayerhq.hu
Sun Jan 28 23:41:18 CET 2007


Author: nicodvb
Date: Sun Jan 28 23:41:18 2007
New Revision: 22059

Modified:
   trunk/libmpdemux/demux_mpg.c

Log:
sanity checks during codec detection; also reset demuxer->stream->eof

Modified: trunk/libmpdemux/demux_mpg.c
==============================================================================
--- trunk/libmpdemux/demux_mpg.c	(original)
+++ trunk/libmpdemux/demux_mpg.c	Sun Jan 28 23:41:18 2007
@@ -1059,11 +1059,13 @@
         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,



More information about the MPlayer-cvslog mailing list