summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-12 16:52:49 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-22 22:09:59 +0200
commit315c956cbd14f021e49dac7fc0b906fad1672aad (patch)
treee16e4f55eeb57cc9c2afcf3f16a48c91d473cb08 /libavcodec/utils.c
parent86ed68420d3b60439d0b7767c53d0fdc1deb7277 (diff)
avcodec/pthread_frame: Remove ff_thread_release_buffer()
It is unnecessary since the removal of non-thread-safe callbacks in e0786a8eeb9e7c8feb057e83f284491f0a87e463. Since then, the AVCodecContext has only been used as logcontext. Removing ff_thread_release_buffer() allowed to remove AVCodecContext* parameters from several other functions (not only unref functions, but also e.g. ff_h264_ref_picture() which calls ff_h264_unref_picture() on error). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index e7af60be98..39b83c7791 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -887,8 +887,7 @@ int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src)
return 0;
}
-int ff_thread_replace_frame(AVCodecContext *avctx, ThreadFrame *dst,
- const ThreadFrame *src)
+int ff_thread_replace_frame(ThreadFrame *dst, const ThreadFrame *src)
{
int ret;
@@ -917,13 +916,7 @@ int ff_thread_get_ext_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
return ff_get_buffer(avctx, f->f, flags);
}
-void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
-{
- if (f)
- av_frame_unref(f);
-}
-
-void ff_thread_release_ext_buffer(AVCodecContext *avctx, ThreadFrame *f)
+void ff_thread_release_ext_buffer(ThreadFrame *f)
{
f->owner[0] = f->owner[1] = NULL;
if (f->f)