Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created April 21, 2017 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8670b535237f0e650947092586e9446d to your computer and use it in GitHub Desktop.
Save anonymous/8670b535237f0e650947092586e9446d to your computer and use it in GitHub Desktop.
ffmpeg patch - fix vaapi hardware configuration
--- a/libavutil/hwcontext_vaapi.c 2017-04-13 03:55:55.000000000 +0200
+++ b/libavutil/hwcontext_vaapi.c 2017-04-21 18:24:20.575277399 +0200
@@ -230,7 +230,9 @@ static int vaapi_frames_get_constraints(
av_assert0(j == pix_fmt_count);
constraints->valid_sw_formats[j] = AV_PIX_FMT_NONE;
}
- } else {
+ }
+
+ if (!config || pix_fmt_count == 0) {
// No configuration supplied.
// Return the full set of image formats known by the implementation.
constraints->valid_sw_formats = av_malloc_array(ctx->nb_formats + 1,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment