[MPlayer-cvslog] r35407 - trunk/libmpdemux/demux_film.c

reimar subversion at mplayerhq.hu
Sat Nov 10 15:31:14 CET 2012


Author: reimar
Date: Sat Nov 10 15:31:14 2012
New Revision: 35407

Log:
Avoid crash when parsing index for audio-only files.

Modified:
   trunk/libmpdemux/demux_film.c

Modified: trunk/libmpdemux/demux_film.c
==============================================================================
--- trunk/libmpdemux/demux_film.c	Sat Nov 10 15:27:09 2012	(r35406)
+++ trunk/libmpdemux/demux_film.c	Sat Nov 10 15:31:14 2012	(r35407)
@@ -410,7 +410,7 @@ static demuxer_t* demux_open_film(demuxe
         if (counting_chunks)
         {
           // if we're counting chunks, always count an audio chunk
-          if (film_chunk.syncinfo1 == 0xFFFFFFFF)
+          if (!sh_video || film_chunk.syncinfo1 == 0xFFFFFFFF)
             film_data->chunks_per_second++;
           // if it's a video chunk, check if it's time to stop counting
           else if ((film_chunk.syncinfo1 & 0x7FFFFFFF) >= sh_video->fps)
@@ -420,7 +420,7 @@ static demuxer_t* demux_open_film(demuxe
         }
 
         // precalculate PTS
-        if (film_chunk.syncinfo1 == 0xFFFFFFFF)
+        if (!sh_video || film_chunk.syncinfo1 == 0xFFFFFFFF)
         {
 	  if(demuxer->audio->id>=-1)
           film_chunk.pts =


More information about the MPlayer-cvslog mailing list