Commit 16f01fa1 authored by Mathieu Velten's avatar Mathieu Velten Committed by Thomas Guillem
Browse files

vaapi/vp9: use ffmpeg context to read the profile



Sometimes the profile is not available in the container metadatas (WebM)
and the VP9 packetizer (AVParser) doesn't report this value.
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 008f7552
...@@ -103,11 +103,14 @@ static int GetVaProfile(AVCodecContext *ctx, const es_format_t *fmt, ...@@ -103,11 +103,14 @@ static int GetVaProfile(AVCodecContext *ctx, const es_format_t *fmt,
count = 5; count = 5;
break; break;
case AV_CODEC_ID_VP9: case AV_CODEC_ID_VP9:
if (fmt->i_profile == FF_PROFILE_VP9_0) if (ctx->profile == FF_PROFILE_VP9_0)
i_profile = VAProfileVP9Profile0; i_profile = VAProfileVP9Profile0;
#if VA_CHECK_VERSION( 0, 39, 0 ) #if VA_CHECK_VERSION( 0, 39, 0 )
else if (fmt->i_profile == FF_PROFILE_VP9_2) else if (ctx->profile == FF_PROFILE_VP9_2)
{
i_profile = VAProfileVP9Profile2; i_profile = VAProfileVP9Profile2;
i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP;
}
#endif #endif
else else
return VLC_EGENERIC; return VLC_EGENERIC;
......
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