Commit 5e872d90 authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit '11b80303'

* commit '11b80303':
  vaapi_encode: Fix fallback when input does not match any format
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents 40b2878a 11b80303
...@@ -1114,8 +1114,11 @@ av_cold int ff_vaapi_encode_init(AVCodecContext *avctx, ...@@ -1114,8 +1114,11 @@ av_cold int ff_vaapi_encode_init(AVCodecContext *avctx,
break; break;
} }
} }
if (recon_format == AV_PIX_FMT_NONE) if (recon_format == AV_PIX_FMT_NONE) {
recon_format = constraints->valid_sw_formats[i]; // No match. Just use the first in the supported list and
// hope for the best.
recon_format = constraints->valid_sw_formats[0];
}
} else { } else {
// No idea what to use; copy input format. // No idea what to use; copy input format.
recon_format = ctx->input_frames->sw_format; recon_format = ctx->input_frames->sw_format;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment