diff options
author | rcombs <rcombs@rcombs.me> | 2021-11-13 15:39:44 -0600 |
---|---|---|
committer | rcombs <rcombs@rcombs.me> | 2021-11-28 16:40:43 -0600 |
commit | 4b54818981d2783af161c2ff670b658afbdda503 (patch) | |
tree | 2316a8467fd2955cfee03b4c3975dba9c5931c78 /fftools/ffmpeg.c | |
parent | 5593f5cf242a99495b6047e5c226bfe4b934342e (diff) | |
download | ffmpeg-4b54818981d2783af161c2ff670b658afbdda503.tar.gz |
ffmpeg: remove ffmpeg_videotoolbox
This was almost completely redundant. The only functionality that's no longer
available after this removal is the videotoolbox_pixfmt arg, which has been
obsolete for several years.
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r-- | fftools/ffmpeg.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index c838e2604c..25360423b5 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2858,12 +2858,7 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat break; } } - if (config) { - if (config->device_type != ist->hwaccel_device_type) { - // Different hwaccel offered, ignore. - continue; - } - + if (config && config->device_type == ist->hwaccel_device_type) { ret = hwaccel_decode_init(s); if (ret < 0) { if (ist->hwaccel_id == HWACCEL_GENERIC) { @@ -2876,36 +2871,10 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat } continue; } - } else { - const HWAccel *hwaccel = NULL; - int i; - for (i = 0; hwaccels[i].name; i++) { - if (hwaccels[i].pix_fmt == *p) { - hwaccel = &hwaccels[i]; - break; - } - } - if (!hwaccel) { - // No hwaccel supporting this pixfmt. - continue; - } - if (hwaccel->id != ist->hwaccel_id) { - // Does not match requested hwaccel. - continue; - } - ret = hwaccel->init(s); - if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, - "%s hwaccel requested for input stream #%d:%d, " - "but cannot be initialized.\n", hwaccel->name, - ist->file_index, ist->st->index); - return AV_PIX_FMT_NONE; - } + ist->hwaccel_pix_fmt = *p; + break; } - - ist->hwaccel_pix_fmt = *p; - break; } return *p; |