mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-11 09:07:29 +00: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:
parent
25d96ab6c0
commit
174cb3accf
@ -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 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user