[FFmpeg-devel] [PATCH 1/4] avcodec/encode: Fix check for encoders impl. encode-simple API
Anton Khirnov
anton at khirnov.net
Wed Apr 13 18:57:31 EEST 2022
Quoting Andreas Rheinhardt (2022-04-13 16:43:28)
> FFCodec.cb is a union.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> libavcodec/encode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/encode.c b/libavcodec/encode.c
> index 6ae47b736c..e7ae2cd4c1 100644
> --- a/libavcodec/encode.c
> +++ b/libavcodec/encode.c
> @@ -589,7 +589,7 @@ int ff_encode_preinit(AVCodecContext *avctx)
> if (avctx->codec_descriptor->props & AV_CODEC_PROP_INTRA_ONLY)
> avctx->internal->intra_only_flag = AV_PKT_FLAG_KEY;
>
> - if (ffcodec(avctx->codec)->cb.encode) {
> + if (ffcodec(avctx->codec)->cb_type == FF_CODEC_CB_TYPE_ENCODE) {
> avci->in_frame = av_frame_alloc();
> if (!avci->in_frame)
> return AVERROR(ENOMEM);
> --
> 2.32.0
Patches 1, 2, 4 look good.
Thank you and sorry for the breakage.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list