[FFmpeg-cvslog] fftools/ffmpeg_dec: remove pointless InputStream.hwaccel_retrieve_data
Anton Khirnov
git at videolan.org
Mon Jun 19 12:11:09 EEST 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Jun 6 12:55:53 2023 +0200| [174cb3accf75d107c2c1b1b2f1138c1e2b3af85b] | committer: Anton Khirnov
fftools/ffmpeg_dec: remove pointless InputStream.hwaccel_retrieve_data
It is always set to hwaccel_retrieve_data() from ffmpeg_hw.c, so that
function can just be called directly instead.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=174cb3accf75d107c2c1b1b2f1138c1e2b3af85b
---
fftools/ffmpeg.h | 1 -
fftools/ffmpeg_dec.c | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index aeecf92fe6..2559225dd6 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -393,7 +393,6 @@ typedef struct InputStream {
char *hwaccel_device;
enum AVPixelFormat hwaccel_output_format;
- int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame);
enum AVPixelFormat hwaccel_pix_fmt;
/* stats */
diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c
index ca9fbb9bd8..85132050d8 100644
--- a/fftools/ffmpeg_dec.c
+++ b/fftools/ffmpeg_dec.c
@@ -272,8 +272,8 @@ static int video_frame_process(InputStream *ist, AVFrame *frame)
if(ist->top_field_first>=0)
frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
- if (ist->hwaccel_retrieve_data && frame->format == ist->hwaccel_pix_fmt) {
- int err = ist->hwaccel_retrieve_data(ist->dec_ctx, frame);
+ if (frame->format == ist->hwaccel_pix_fmt) {
+ int err = hwaccel_retrieve_data(ist->dec_ctx, frame);
if (err < 0)
return err;
}
@@ -561,7 +561,6 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat
}
}
if (config && config->device_type == ist->hwaccel_device_type) {
- ist->hwaccel_retrieve_data = hwaccel_retrieve_data;
ist->hwaccel_pix_fmt = *p;
break;
}
More information about the ffmpeg-cvslog
mailing list