mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
avcodec/encode: Fix check for encoders impl. encode-simple API
FFCodec.cb is a union. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
f67403edb3
commit
3a920372a1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user