diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-09-08 14:46:02 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-09-08 14:46:02 +0200 |
commit | f4ce8cea7327a452441a5920426cb391adca61b2 (patch) | |
tree | ae13fe658f2a37c4f611263036bd4dda9f155b37 | |
parent | 72773203a64af0a66a4e37fa03bf8744116f517a (diff) | |
parent | 7cad1bf0759ada2a1fc3e80bb232a5377dd4fda4 (diff) | |
download | ffmpeg-f4ce8cea7327a452441a5920426cb391adca61b2.tar.gz |
Merge commit '7cad1bf0759ada2a1fc3e80bb232a5377dd4fda4'
* commit '7cad1bf0759ada2a1fc3e80bb232a5377dd4fda4':
mov: Allow more than one keyframe per trun
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 92d90dbb30..471b6ca0ae 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3428,7 +3428,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) int64_t dts; int data_offset = 0; unsigned entries, first_sample_flags = frag->flags; - int flags, distance, i, found_keyframe = 0, err; + int flags, distance, i, err; for (i = 0; i < c->fc->nb_streams; i++) { if (c->fc->streams[i]->id == frag->track_id) { @@ -3515,8 +3515,8 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->ctts_count++; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) keyframe = 1; - else if (!found_keyframe) - keyframe = found_keyframe = + else + keyframe = !(sample_flags & (MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC | MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES)); if (keyframe) |