summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-05-20 00:59:32 -0300
committerJames Almer <jamrial@gmail.com>2020-05-21 12:32:15 -0300
commitd3bedba97fcbc395d61c509ab41da4fec498db2b (patch)
tree3a7a75fe7becfeb4caa75edb4ac84bd8031b4613 /libavcodec
parent70faa9f618183956d42d520f516b6d0c8e3d81ce (diff)
avcodec/decode: remove ff_decode_bsfs_uninit()
It's been a wrapper for a simple av_bsf_free() call since c96904f525. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/decode.c7
-rw-r--r--libavcodec/decode.h6
-rw-r--r--libavcodec/utils.c4
3 files changed, 7 insertions, 10 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 48a61d5419..f3327d74af 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -231,7 +231,7 @@ int ff_decode_bsfs_init(AVCodecContext *avctx)
return 0;
fail:
- ff_decode_bsfs_uninit(avctx);
+ av_bsf_free(&avci->bsf);
return ret;
}
@@ -2005,8 +2005,3 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
if (!avctx->refcounted_frames)
av_frame_unref(avci->to_free);
}
-
-void ff_decode_bsfs_uninit(AVCodecContext *avctx)
-{
- av_bsf_free(&avctx->internal->bsf);
-}
diff --git a/libavcodec/decode.h b/libavcodec/decode.h
index c3e0e82f4c..5565346f96 100644
--- a/libavcodec/decode.h
+++ b/libavcodec/decode.h
@@ -64,10 +64,12 @@ typedef struct FrameDecodeData {
*/
int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt);
+/**
+ * Called during avcodec_open2() to initialize avctx->internal->bsf.
+ * The bsf should be freed with av_bsf_free().
+ */
int ff_decode_bsfs_init(AVCodecContext *avctx);
-void ff_decode_bsfs_uninit(AVCodecContext *avctx);
-
/**
* Make sure avctx.hw_frames_ctx is set. If it's not set, the function will
* try to allocate it from hw_device_ctx. If that is not possible, an error
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 91b271a717..3255679550 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1045,7 +1045,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_packet_free(&avci->last_pkt_props);
av_packet_free(&avci->ds.in_pkt);
- ff_decode_bsfs_uninit(avctx);
+ av_bsf_free(&avci->bsf);
av_buffer_unref(&avci->pool);
}
@@ -1106,7 +1106,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
avctx->hwaccel->uninit(avctx);
av_freep(&avctx->internal->hwaccel_priv_data);
- ff_decode_bsfs_uninit(avctx);
+ av_bsf_free(&avctx->internal->bsf);
av_freep(&avctx->internal);
}