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
231231
232232 return 0;
233233 fail:
234− ff_decode_bsfs_uninit(avctx);
234+ av_bsf_free(&avci->bsf);
235235 return ret;
236236 }
237237
@@ -2005,8 +2005,3 @@ void avcodec_flush_buffers(AVCodecContext *avctx) · 1767 unmodified lines
20052005 if (!avctx->refcounted_frames)
20062006 av_frame_unref(avci->to_free);
20072007 }
2008−
2009−void 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
6464 */
6565 int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt);
6666
67+/**
68+ * Called during avcodec_open2() to initialize avctx->internal->bsf.
69+ * The bsf should be freed with av_bsf_free().
70+ */
6771 int ff_decode_bsfs_init(AVCodecContext *avctx);
6872
69−void ff_decode_bsfs_uninit(AVCodecContext *avctx);
70−
7173 /**
7274 * Make sure avctx.hw_frames_ctx is set. If it's not set, the function will
7375 * 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
10451045 av_packet_free(&avci->last_pkt_props);
10461046
10471047 av_packet_free(&avci->ds.in_pkt);
1048− ff_decode_bsfs_uninit(avctx);
1048+ av_bsf_free(&avci->bsf);
10491049
10501050 av_buffer_unref(&avci->pool);
10511051 }
@@ -1106,7 +1106,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) · 54 unmodified lines
11061106 avctx->hwaccel->uninit(avctx);
11071107 av_freep(&avctx->internal->hwaccel_priv_data);
11081108
1109− ff_decode_bsfs_uninit(avctx);
1109+ av_bsf_free(&avctx->internal->bsf);
11101110
11111111 av_freep(&avctx->internal);
11121112 }

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