[FFmpeg-cvslog] r18181 - trunk/libavformat/mov.c
bcoudurier
subversion
Wed Mar 25 07:07:14 CET 2009
Author: bcoudurier
Date: Wed Mar 25 07:07:13 2009
New Revision: 18181
Log:
set wrong dts for iMovie created files which has huge ctts delay, fix ffmpeg_sample.m4v
Modified:
trunk/libavformat/mov.c
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c Wed Mar 25 01:50:56 2009 (r18180)
+++ trunk/libavformat/mov.c Wed Mar 25 07:07:13 2009 (r18181)
@@ -1281,6 +1281,12 @@ static void mov_build_index(MOVContext *
int rescaled = sc->time_offset < 0 ? av_rescale(sc->time_offset, sc->time_scale, mov->time_scale) : sc->time_offset;
assert(sc->time_offset % sc->time_rate == 0);
current_dts = - (rescaled / sc->time_rate);
+ if (sc->ctts_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;
+ st->codec->has_b_frames = 1;
+ }
}
/* only use old uncompressed audio chunk demuxing when stts specifies it */
More information about the ffmpeg-cvslog
mailing list