Commit 75ab1e62 authored by Martin Storsjö's avatar Martin Storsjö

movdec: Ignore sample_degradation_priority bits when checking first_sample_flags

This makes the first packet of a track fragment run to get
the keyframe flag set properly if sample_degradation_priority
is nonzero.

This makes the keyframes flag be set properly for ismv files
created by Microsoft.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 89f6e8a2
......@@ -2250,7 +2250,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->ctts_data[sc->ctts_count].duration = (flags & 0x800) ? avio_rb32(pb) : 0;
sc->ctts_count++;
if ((keyframe = st->codec->codec_type == AVMEDIA_TYPE_AUDIO ||
(flags & 0x004 && !i && !sample_flags) || sample_flags & 0x2000000))
(flags & 0x004 && !i && !(sample_flags & 0xffff0000)) || sample_flags & 0x2000000))
distance = 0;
av_add_index_entry(st, offset, dts, sample_size, distance,
keyframe ? AVINDEX_KEYFRAME : 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment