diff mbox series

[FFmpeg-devel,2/2] avcodec/mediacodecenc: warning when global header is requested.

Message ID tencent_3AE54D5313284333F7936775D2E910EEA305@qq.com
State Accepted
Commit 862a626c9db537f4ba248649353166a5004189b3
Headers show
Series [FFmpeg-devel,1/2] avformat/flvenc: use extract_extradata bsf when necessary | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili March 15, 2023, 4:27 p.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

Add suggests to use extract_extradata bsf.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
---
 libavcodec/mediacodecenc.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 2ab56597fe..27a2cd883d 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -317,6 +317,10 @@  static av_cold int mediacodec_init(AVCodecContext *avctx)
         goto bailout;
 
     mediacodec_output_format(avctx);
+    if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)
+        av_log(avctx, AV_LOG_WARNING,
+                "Mediacodec encoder doesn't support AV_CODEC_FLAG_GLOBAL_HEADER. "
+                "Use extract_extradata bsf when necessary.\n");
 
     s->frame = av_frame_alloc();
     if (!s->frame)