diff mbox

[FFmpeg-devel,3/4] vaapi_decode: Ignore the profile when not useful

Message ID 20170219172307.27012-4-sw@jkqxz.net
State Superseded
Headers show

Commit Message

Mark Thompson Feb. 19, 2017, 5:23 p.m. UTC
Enables VP8 decoding - the decoder places the the bitstream version
in the profile field, which we want to ignore.

(cherry picked from commit 11c191b52ce0768370e38a2726132f9223e701f6)
---
 libavcodec/vaapi_decode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index da9e4aedde..388764c6ef 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -322,7 +322,8 @@  static int vaapi_decode_make_config(AVCodecContext *avctx)
         int profile_match = 0;
         if (avctx->codec_id != vaapi_profile_map[i].codec_id)
             continue;
-        if (avctx->profile == vaapi_profile_map[i].codec_profile)
+        if (avctx->profile == vaapi_profile_map[i].codec_profile ||
+            vaapi_profile_map[i].codec_profile == FF_PROFILE_UNKNOWN)
             profile_match = 1;
         profile = vaapi_profile_map[i].va_profile;
         for (j = 0; j < profile_count; j++) {