[FFmpeg-cvslog] r26227 - trunk/libavformat/mov.c

bcoudurier subversion
Wed Jan 5 20:14:44 CET 2011


Author: bcoudurier
Date: Wed Jan  5 20:14:44 2011
New Revision: 26227

Log:
In mov demuxer, check that stts data exists, fix crash, issue #2479

Modified:
   trunk/libavformat/mov.c

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	Wed Jan  5 17:02:08 2011	(r26226)
+++ trunk/libavformat/mov.c	Wed Jan  5 20:14:44 2011	(r26227)
@@ -1515,7 +1515,8 @@ static void mov_build_index(MOVContext *
     if (sc->time_offset) {
         int rescaled = sc->time_offset < 0 ? av_rescale(sc->time_offset, sc->time_scale, mov->time_scale) : sc->time_offset;
         current_dts = -rescaled;
-        if (sc->ctts_data && sc->ctts_data[0].duration / sc->stts_data[0].duration > 16) {
+        if (sc->ctts_data && sc->stts_data &&
+            sc->ctts_data[0].duration / sc->stts_data[0].duration > 16) {
             /* more than 16 frames delay, dts are likely wrong
                this happens with files created by iMovie */
             sc->wrong_dts = 1;



More information about the ffmpeg-cvslog mailing list