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

reimar subversion at mplayerhq.hu
Tue Dec 30 09:59:22 CET 2014


Author: reimar
Date: Tue Dec 30 09:59:22 2014
New Revision: 37347

Log:
demux_mpg: if ps_probe is set, also probe for audio stream.

Related to trac #2219.

Modified:
   trunk/libmpdemux/demux_mpg.c

Modified: trunk/libmpdemux/demux_mpg.c
==============================================================================
--- trunk/libmpdemux/demux_mpg.c	Tue Dec 30 09:59:20 2014	(r37346)
+++ trunk/libmpdemux/demux_mpg.c	Tue Dec 30 09:59:22 2014	(r37347)
@@ -1139,6 +1139,15 @@ static demuxer_t* demux_mpg_ps_open(demu
         else sh_video->format = 0x10000002;
     }
 
+    // Try to ensure audio information is probed during open, too.
+    if (demuxer->audio->id == -1 && ps_probe > 0)
+    {
+        off_t pos = stream_tell(demuxer->stream);
+        while (stream_tell(demuxer->stream) < pos + ps_probe && !demuxer->stream->eof && !demuxer->audio->packs)
+          if (!demux_fill_buffer(demuxer, demuxer->audio))
+            break;
+    }
+
     return demuxer;
 }
 


More information about the MPlayer-cvslog mailing list