changeset 36447:740a60d26cc0

Only detect a file as MPEG-PS if we can find at least 2 packets.
author reimar
date Wed, 11 Dec 2013 20:03:03 +0000
parents af0a7a216a2c
children 10a58d3ec0ef
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Wed Dec 11 20:03:02 2013 +0000
+++ b/libmpdemux/demux_mpg.c	Wed Dec 11 20:03:03 2013 +0000
@@ -191,7 +191,8 @@
   stream_t *s = demuxer->stream;
   mpg_demuxer_t* mpg_d;
 
-  if (!ds_fill_buffer(demuxer->video)) return 0;
+  while (demuxer->video->packs + demuxer->audio->packs < 2)
+    if (!ds_fill_buffer(demuxer->video)) return 0;
   mpg_d = calloc(1,sizeof(mpg_demuxer_t));
   if(mpg_d)
   {