It's been a wrapper for a simple av_bsf_free() call since c96904f525.
Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.3
| @@ -231,7 +231,7 @@ int ff_decode_bsfs_init(AVCodecContext *avctx) | |||||
| return 0; | return 0; | ||||
| fail: | fail: | ||||
| ff_decode_bsfs_uninit(avctx); | |||||
| av_bsf_free(&avci->bsf); | |||||
| return ret; | return ret; | ||||
| } | } | ||||
| @@ -2005,8 +2005,3 @@ void avcodec_flush_buffers(AVCodecContext *avctx) | |||||
| if (!avctx->refcounted_frames) | if (!avctx->refcounted_frames) | ||||
| av_frame_unref(avci->to_free); | av_frame_unref(avci->to_free); | ||||
| } | } | ||||
| void ff_decode_bsfs_uninit(AVCodecContext *avctx) | |||||
| { | |||||
| av_bsf_free(&avctx->internal->bsf); | |||||
| } | |||||
| @@ -64,10 +64,12 @@ typedef struct FrameDecodeData { | |||||
| */ | */ | ||||
| int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt); | 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); | 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 | * 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 | * try to allocate it from hw_device_ctx. If that is not possible, an error | ||||
| @@ -1045,7 +1045,7 @@ FF_ENABLE_DEPRECATION_WARNINGS | |||||
| av_packet_free(&avci->last_pkt_props); | av_packet_free(&avci->last_pkt_props); | ||||
| av_packet_free(&avci->ds.in_pkt); | av_packet_free(&avci->ds.in_pkt); | ||||
| ff_decode_bsfs_uninit(avctx); | |||||
| av_bsf_free(&avci->bsf); | |||||
| av_buffer_unref(&avci->pool); | av_buffer_unref(&avci->pool); | ||||
| } | } | ||||
| @@ -1106,7 +1106,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) | |||||
| avctx->hwaccel->uninit(avctx); | avctx->hwaccel->uninit(avctx); | ||||
| av_freep(&avctx->internal->hwaccel_priv_data); | av_freep(&avctx->internal->hwaccel_priv_data); | ||||
| ff_decode_bsfs_uninit(avctx); | |||||
| av_bsf_free(&avctx->internal->bsf); | |||||
| av_freep(&avctx->internal); | av_freep(&avctx->internal); | ||||
| } | } | ||||