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

reimar subversion at mplayerhq.hu
Wed Dec 11 21:03:02 CET 2013


Author: reimar
Date: Wed Dec 11 21:03:02 2013
New Revision: 36542

Log:
Fix potential endless loop while probing.

Modified:
   trunk/libmpdemux/demux_mpg.c

Modified: trunk/libmpdemux/demux_mpg.c
==============================================================================
--- trunk/libmpdemux/demux_mpg.c	Mon Dec  9 15:11:16 2013	(r36541)
+++ trunk/libmpdemux/demux_mpg.c	Wed Dec 11 21:03:02 2013	(r36542)
@@ -84,6 +84,8 @@ static int parse_psm(demuxer_t *demux, i
   es_map_len = stream_read_word(demux->stream);		//length of elementary streams map
   es_map_len = FFMIN(es_map_len, len - prog_len - 8);	//sanity check
   while(es_map_len > 0) {
+    if (demux->stream->eof)
+      return 0;
     type = stream_read_char(demux->stream);
     id = stream_read_char(demux->stream);
     if(id >= 0xB0 && id <= 0xEF && priv) {


More information about the MPlayer-cvslog mailing list