]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/decode: remove ff_decode_bsfs_uninit()
authorJames Almer <jamrial@gmail.com>
Wed, 20 May 2020 03:59:32 +0000 (00:59 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 21 May 2020 15:32:15 +0000 (12:32 -0300)
It's been a wrapper for a simple av_bsf_free() call since c96904f525.

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/decode.c
libavcodec/decode.h
libavcodec/utils.c

index 48a61d5419d5b687b6584e4616161586fe3acf84..f3327d74afaad1d4d503c98079f946d81a18f4e6 100644 (file)
@@ -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);
-}
index c3e0e82f4cdacc36c4bdd124022349c62b2b74ea..5565346f9623dff5c41d1b6718183df00a4034b1 100644 (file)
@@ -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
index 91b271a71717d01b1d50e6dff0fab328481ecb62..325567955089f14d207e43ea048231719e959eb7 100644 (file)
@@ -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);
     }