summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-11-14 12:23:31 -0300
committerJames Almer <jamrial@gmail.com>2021-11-19 15:26:11 -0300
commit379f8b8ec6213789afc174d57c2751c52e66a8a7 (patch)
treefbbd336a05cc4249eda08e83edef150588e5d698 /fftools
parentce8f77a903e1108bde774d5e0e59d8cd24f18c46 (diff)
ffmpeg: remove unused hwaccel_get_buffer function pointer
As well as the custom get_buffer2() implementation which would become a redundant wrapper for avcodec_default_get_buffer2() after this Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.c11
-rw-r--r--fftools/ffmpeg.h1
2 files changed, 0 insertions, 12 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index e88ca554ae..5e3bfcdbbc 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2926,16 +2926,6 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat
return *p;
}
-static int get_buffer(AVCodecContext *s, AVFrame *frame, int flags)
-{
- InputStream *ist = s->opaque;
-
- if (ist->hwaccel_get_buffer && frame->format == ist->hwaccel_pix_fmt)
- return ist->hwaccel_get_buffer(s, frame, flags);
-
- return avcodec_default_get_buffer2(s, frame, flags);
-}
-
static int init_input_stream(int ist_index, char *error, int error_len)
{
int ret;
@@ -2951,7 +2941,6 @@ static int init_input_stream(int ist_index, char *error, int error_len)
ist->dec_ctx->opaque = ist;
ist->dec_ctx->get_format = get_format;
- ist->dec_ctx->get_buffer2 = get_buffer;
#if LIBAVCODEC_VERSION_MAJOR < 60
FF_DISABLE_DEPRECATION_WARNINGS
ist->dec_ctx->thread_safe_callbacks = 1;
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 545ff1c8e7..f27878b196 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -378,7 +378,6 @@ typedef struct InputStream {
/* hwaccel context */
void *hwaccel_ctx;
void (*hwaccel_uninit)(AVCodecContext *s);
- int (*hwaccel_get_buffer)(AVCodecContext *s, AVFrame *frame, int flags);
int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame);
enum AVPixelFormat hwaccel_pix_fmt;
enum AVPixelFormat hwaccel_retrieved_pix_fmt;