summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2023-11-18 16:03:12 +0800
committerZhao Zhili <zhilizhao@tencent.com>2023-11-22 21:02:04 +0800
commite1d6b3cb5a271ac7fce35d4a96b9ab45a251c6d5 (patch)
treee0361d3de04f4329888e0c3e7667dd2b2ee3c515
parentf27fce0c0cc67ed2d36d7353d843234829bb2f5f (diff)
avformat/flvenc: add extract_extradata bsf for new video codecs
When encoders don't support global header like MediaCodec, FLV muxer needs to add extract_extradata bsf automatically. The codec list doesn't include VP9 since it's not supported by extract_extradata. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
-rw-r--r--libavformat/flvenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index f6d10f331c..874560fac1 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -1072,6 +1072,8 @@ static int flv_check_bitstream(AVFormatContext *s, AVStream *st,
}
if (!st->codecpar->extradata_size &&
(st->codecpar->codec_id == AV_CODEC_ID_H264 ||
+ st->codecpar->codec_id == AV_CODEC_ID_HEVC ||
+ st->codecpar->codec_id == AV_CODEC_ID_AV1 ||
st->codecpar->codec_id == AV_CODEC_ID_MPEG4))
return ff_stream_add_bitstream_filter(st, "extract_extradata", NULL);
return 1;