History

avcodec/decode: remove ff_decode_bsfs_uninit()

It's been a wrapper for a simple av_bsf_free() call since c96904f525.

James Almer committed 6 years ago

Commit d3bedba1 parent 70faa9f3 files · +7 −10Browse files

Unified · Split

3 files
  1. libavcodec/decode.c +1 −6
  2. libavcodec/decode.h +4 −2
  3. libavcodec/utils.c +2 −2
libavcodec/decode.c+1−6
@@ -231,7 +231,7 @@ int ff_decode_bsfs_init(AVCodecContext *avctx) · 230 unmodified lines
231 231
232 return 0;232 return 0;
233fail:233fail:
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
2009void ff_decode_bsfs_uninit(AVCodecContext *avctx)
2010{
2011 av_bsf_free(&avctx->internal->bsf);
2012}
libavcodec/decode.h+4−2
@@ -64,10 +64,12 @@ typedef struct FrameDecodeData { · 63 unmodified lines
64 */64 */
65int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt);65int 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 */
67int ff_decode_bsfs_init(AVCodecContext *avctx);71int ff_decode_bsfs_init(AVCodecContext *avctx);
68 72
69void 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 will74 * 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 error75 * try to allocate it from hw_device_ctx. If that is not possible, an error
libavcodec/utils.c+2−2
@@ -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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t