1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

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.
This commit is contained in:
Anton Khirnov
2023-06-06 12:55:53 +02:00
parent 25d96ab6c0
commit 174cb3accf
2 changed files with 2 additions and 4 deletions

View File

@@ -393,7 +393,6 @@ typedef struct InputStream {
char *hwaccel_device; char *hwaccel_device;
enum AVPixelFormat hwaccel_output_format; enum AVPixelFormat hwaccel_output_format;
int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame);
enum AVPixelFormat hwaccel_pix_fmt; enum AVPixelFormat hwaccel_pix_fmt;
/* stats */ /* stats */

View File

@@ -272,8 +272,8 @@ static int video_frame_process(InputStream *ist, AVFrame *frame)
if(ist->top_field_first>=0) if(ist->top_field_first>=0)
frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
if (ist->hwaccel_retrieve_data && frame->format == ist->hwaccel_pix_fmt) { if (frame->format == ist->hwaccel_pix_fmt) {
int err = ist->hwaccel_retrieve_data(ist->dec_ctx, frame); int err = hwaccel_retrieve_data(ist->dec_ctx, frame);
if (err < 0) if (err < 0)
return err; 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) { if (config && config->device_type == ist->hwaccel_device_type) {
ist->hwaccel_retrieve_data = hwaccel_retrieve_data;
ist->hwaccel_pix_fmt = *p; ist->hwaccel_pix_fmt = *p;
break; break;
} }