1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili 2024-03-04 11:37:58 +08:00
parent fed46d7706
commit b0e17e0f95

View File

@ -319,6 +319,9 @@ static av_cold int mediacodec_init(AVCodecContext *avctx)
ret = ff_AMediaCodec_configure(s->codec, format, s->window, NULL, ret);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "MediaCodec configure failed, %s\n", av_err2str(ret));
if (avctx->pix_fmt == AV_PIX_FMT_YUV420P)
av_log(avctx, AV_LOG_ERROR, "Please try -pix_fmt nv12, some devices don't "
"support yuv420p as encoder input format.\n");
goto bailout;
}