summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-08-26 14:30:06 +0100
committerLuca Barbato <lu_zero@gentoo.org>2016-08-29 15:31:03 +0200
commiteb96505b761eb02b6a3efc76d854afa6a41941ff (patch)
treeeddd79e28f2d56bd6039b9496de9c111ffaf942e /libavformat
parent4ab496261b12e20ef293b7adca4fcaef1a67c538 (diff)
mov: Remove ancient heuristic hack
This breaks files with legitimate single-entry edit lists, and the hack, introduced in f03a081df09f9c4798a17d7e24446ed47924b11b, has no link to any known sample in its commit message. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/isom.h1
-rw-r--r--libavformat/mov.c8
2 files changed, 1 insertions, 8 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h
index 75aa70bccc..58f0a20062 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -128,7 +128,6 @@ typedef struct MOVStreamContext {
unsigned drefs_count;
MOVDref *drefs;
int dref_id;
- int wrong_dts; ///< dts are wrong due to huge ctts offset (iMovie files)
int width; ///< tkhd width
int height; ///< tkhd height
int dts_shift; ///< dts shift when ctts is negative
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 03427d7e06..89c2c23fe4 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2307,12 +2307,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->time_scale);
current_dts = -sc->time_offset;
if (sc->ctts_data && sc->stts_data && sc->stts_data[0].duration &&
- 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;
+ sc->ctts_data[0].duration / sc->stts_data[0].duration > 16)
st->internal->avctx->has_b_frames = 1;
- }
}
/* only use old uncompressed audio chunk demuxing when stts specifies it */
@@ -3670,8 +3666,6 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
sc->ctts_index++;
sc->ctts_sample = 0;
}
- if (sc->wrong_dts)
- pkt->dts = AV_NOPTS_VALUE;
} else {
int64_t next_dts = (sc->current_sample < st->nb_index_entries) ?
st->index_entries[sc->current_sample].timestamp : st->duration;