summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-14 04:09:53 +0200
committerJames Almer <jamrial@gmail.com>2021-04-27 10:43:12 -0300
commit7c1f347b184b6738abdc22fdcda40baa9f932522 (patch)
treeec42fcaeda4ce0beaff72af7fb73fb9cebb6d31c /libavcodec/avcodec.c
parent11bc79089378a5ec00547d0f85bc152afdf30dfa (diff)
downloadffmpeg-7c1f347b184b6738abdc22fdcda40baa9f932522.tar.gz
avcodec: Remove deprecated old encode/decode APIs
Deprecated in commits 7fc329e2dd6226dfecaa4a1d7adf353bf2773726 and 31f6a4b4b83aca1d73f3cfc99ce2b39331970bf3. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r--libavcodec/avcodec.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index 322dc9ea66..a385821375 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -181,15 +181,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
}
avctx->internal = avci;
-#if FF_API_OLD_ENCDEC
- avci->to_free = av_frame_alloc();
- avci->compat_decode_frame = av_frame_alloc();
- avci->compat_encode_packet = av_packet_alloc();
- if (!avci->to_free || !avci->compat_decode_frame || !avci->compat_encode_packet) {
- ret = AVERROR(ENOMEM);
- goto free_and_end;
- }
-#endif
avci->buffer_frame = av_frame_alloc();
avci->buffer_pkt = av_packet_alloc();
avci->es.in_frame = av_frame_alloc();
@@ -409,11 +400,6 @@ free_and_end:
if (av_codec_is_decoder(avctx->codec))
av_freep(&avctx->subtitle_header);
-#if FF_API_OLD_ENCDEC
- av_frame_free(&avci->to_free);
- av_frame_free(&avci->compat_decode_frame);
- av_packet_free(&avci->compat_encode_packet);
-#endif
av_frame_free(&avci->buffer_frame);
av_packet_free(&avci->buffer_pkt);
av_packet_free(&avci->last_pkt_props);
@@ -453,10 +439,6 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
avci->draining_done = 0;
avci->nb_draining_errors = 0;
av_frame_unref(avci->buffer_frame);
-#if FF_API_OLD_ENCDEC
- av_frame_unref(avci->compat_decode_frame);
- av_packet_unref(avci->compat_encode_packet);
-#endif
av_packet_unref(avci->buffer_pkt);
av_packet_unref(avci->last_pkt_props);
@@ -481,13 +463,6 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
if (av_codec_is_decoder(avctx->codec))
av_bsf_flush(avci->bsf);
-
-#if FF_API_OLD_ENCDEC
-FF_DISABLE_DEPRECATION_WARNINGS
- if (!avctx->refcounted_frames)
- av_frame_unref(avci->to_free);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
void avsubtitle_free(AVSubtitle *sub)
@@ -529,11 +504,6 @@ av_cold int avcodec_close(AVCodecContext *avctx)
avctx->codec->close(avctx);
avci->byte_buffer_size = 0;
av_freep(&avci->byte_buffer);
-#if FF_API_OLD_ENCDEC
- av_frame_free(&avci->to_free);
- av_frame_free(&avci->compat_decode_frame);
- av_packet_free(&avci->compat_encode_packet);
-#endif
av_frame_free(&avci->buffer_frame);
av_packet_free(&avci->buffer_pkt);
av_packet_unref(avci->last_pkt_props);