# HG changeset patch # User reimar # Date 1352557874 0 # Node ID 2b211b058ee2e7e341a3c98f40991408872d19b5 # Parent 3e6a575bd47bcce81533767d0e962db54e1b95cb Avoid crash when parsing index for audio-only files. diff -r 3e6a575bd47b -r 2b211b058ee2 libmpdemux/demux_film.c --- a/libmpdemux/demux_film.c Sat Nov 10 14:27:09 2012 +0000 +++ b/libmpdemux/demux_film.c Sat Nov 10 14:31:14 2012 +0000 @@ -410,7 +410,7 @@ 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 @@ } // precalculate PTS - if (film_chunk.syncinfo1 == 0xFFFFFFFF) + if (!sh_video || film_chunk.syncinfo1 == 0xFFFFFFFF) { if(demuxer->audio->id>=-1) film_chunk.pts =