It's been a wrapper for a simple av_bsf_free() call since c96904f525.
Unified · Split
| @@ -231,7 +231,7 @@ int ff_decode_bsfs_init(AVCodecContext *avctx) · 230 unmodified lines | |||
| 231 | 231 | ||
| 232 | return 0; | 232 | return 0; |
| 233 | fail: | 233 | fail: |
| 234 | ff_decode_bsfs_uninit(avctx); | 234 | av_bsf_free(&avci->bsf); |
| 235 | return ret; | 235 | return ret; |
| 236 | } | 236 | } |
| 237 | 237 | ||
| @@ -2005,8 +2005,3 @@ void avcodec_flush_buffers(AVCodecContext *avctx) · 1767 unmodified lines | |||
| 2005 | if (!avctx->refcounted_frames) | 2005 | if (!avctx->refcounted_frames) |
| 2006 | av_frame_unref(avci->to_free); | 2006 | av_frame_unref(avci->to_free); |
| 2007 | } | 2007 | } |
| 2008 | |||
| 2009 | void ff_decode_bsfs_uninit(AVCodecContext *avctx) | ||
| 2010 | { | ||
| 2011 | av_bsf_free(&avctx->internal->bsf); | ||
| 2012 | } | ||
| @@ -64,10 +64,12 @@ typedef struct FrameDecodeData { · 63 unmodified lines | |||
| 64 | */ | 64 | */ |
| 65 | int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt); | 65 | int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt); |
| 66 | 66 | ||
| 67 | /** | ||
| 68 | * Called during avcodec_open2() to initialize avctx->internal->bsf. | ||
| 69 | * The bsf should be freed with av_bsf_free(). | ||
| 70 | */ | ||
| 67 | int ff_decode_bsfs_init(AVCodecContext *avctx); | 71 | int ff_decode_bsfs_init(AVCodecContext *avctx); |
| 68 | 72 | ||
| 69 | void ff_decode_bsfs_uninit(AVCodecContext *avctx); | ||
| 70 | |||
| 71 | /** | 73 | /** |
| 72 | * Make sure avctx.hw_frames_ctx is set. If it's not set, the function will | 74 | * Make sure avctx.hw_frames_ctx is set. If it's not set, the function will |
| 73 | * try to allocate it from hw_device_ctx. If that is not possible, an error | 75 | * try to allocate it from hw_device_ctx. If that is not possible, an error |
| @@ -1045,7 +1045,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 1044 unmodified lines | |||
| 1045 | av_packet_free(&avci->last_pkt_props); | 1045 | av_packet_free(&avci->last_pkt_props); |
| 1046 | 1046 | ||
| 1047 | av_packet_free(&avci->ds.in_pkt); | 1047 | av_packet_free(&avci->ds.in_pkt); |
| 1048 | ff_decode_bsfs_uninit(avctx); | 1048 | av_bsf_free(&avci->bsf); |
| 1049 | 1049 | ||
| 1050 | av_buffer_unref(&avci->pool); | 1050 | av_buffer_unref(&avci->pool); |
| 1051 | } | 1051 | } |
| @@ -1106,7 +1106,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 54 unmodified lines | |||
| 1106 | avctx->hwaccel->uninit(avctx); | 1106 | avctx->hwaccel->uninit(avctx); |
| 1107 | av_freep(&avctx->internal->hwaccel_priv_data); | 1107 | av_freep(&avctx->internal->hwaccel_priv_data); |
| 1108 | 1108 | ||
| 1109 | ff_decode_bsfs_uninit(avctx); | 1109 | av_bsf_free(&avctx->internal->bsf); |
| 1110 | 1110 | ||
| 1111 | av_freep(&avctx->internal); | 1111 | av_freep(&avctx->internal); |
| 1112 | } | 1112 | } |