summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorVikas Agrawal <vikasa@nvidia.com>2020-08-21 12:07:18 +0530
committerJames Almer <jamrial@gmail.com>2020-08-24 11:40:03 -0300
commit026fea827d7957c4f9de5a81beab6e7eacfabfe0 (patch)
treebe80833352c9c39b6801576c04fb780edddbc9ee /libavformat/mov.c
parent7969551a22440adf51a5b6ad9aa0f524c6eff3b3 (diff)
Set AVSTREAM_PARSE_HEADERS flag for AV1 MP4 streams
It help initialize chroma format and other info properly Chroma format wasn't correct if I use below code: avformat_find_stream_info(fmtc, NULL); iVideoStream = av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0); eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar->format; Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1532e74d67..4c8598c992 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2423,6 +2423,9 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
case AV_CODEC_ID_VP9:
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
+ case AV_CODEC_ID_AV1:
+ st->need_parsing = AVSTREAM_PARSE_HEADERS;
+ break;
default:
break;
}