From 75ab1e62d4187c8ad627835ee8fcf38501477caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 18 Jan 2012 15:12:10 +0200 Subject: [PATCH] movdec: Ignore sample_degradation_priority bits when checking first_sample_flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Martin Storsjö --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index b7d8a55933..0ce32e0f8e 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -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);