diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-01-25 12:03:44 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-01-26 17:05:58 +0100 |
commit | 9e30859cb60b915f237581e3ce91b0d31592edc0 (patch) | |
tree | 273bc816c6712a7a32a16b4354d5880412ea2575 /libavcodec/decode.c | |
parent | 25f4304ebbf96c7ae2952d72b04ad244f8d96334 (diff) |
lavc: shedule old encoding/decoding API for removal
It has been deprecated for 4 years and certain new codecs do not work
with it.
Also include AVCodecContext.refcounted_frames, as it has no effect with
the new API.
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r-- | libavcodec/decode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 9861ead073..8086362eb2 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -221,8 +221,10 @@ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt) if (ret < 0) goto finish; +#if FF_API_OLD_ENCDEC if (avctx->codec->receive_frame) avci->compat_decode_consumed += pkt->size; +#endif return 0; finish: @@ -469,7 +471,9 @@ FF_ENABLE_DEPRECATION_WARNINGS } } +#if FF_API_OLD_ENCDEC avci->compat_decode_consumed += ret; +#endif if (ret >= pkt->size || ret < 0) { av_packet_unref(pkt); @@ -693,6 +697,8 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr return 0; } +#if FF_API_OLD_ENCDEC +FF_DISABLE_DEPRECATION_WARNINGS static int unrefcount_frame(AVCodecInternal *avci, AVFrame *frame) { int ret; @@ -834,6 +840,8 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, { return compat_decode(avctx, frame, got_frame_ptr, avpkt); } +FF_ENABLE_DEPRECATION_WARNINGS +#endif static void get_subtitle_defaults(AVSubtitle *sub) { |