[vlc-commits] [Git][videolan/vlc][3.0.x] avcodec: vaapi: use profile from AVCodecContext

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jul 29 14:25:46 UTC 2022



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
7c897c4d by Thomas Guillem at 2022-07-29T14:01:42+00:00
avcodec: vaapi: use profile from AVCodecContext

Like it's done in other part of the GetVaProfile() function.

For the current issue, the extra data is set midstream by lavc (and not
by our mkv demux).

The 4.0 branch does not need this patch since the VAAPI initialisation
is done by lavc.

Thanks Steve for the hint.

Co-authored-by: Steve Lhomme <robux4 at ycbcr.xyz>

Fixes #27163

- - - - -


1 changed file:

- modules/codec/avcodec/vaapi.c


Changes:

=====================================
modules/codec/avcodec/vaapi.c
=====================================
@@ -87,9 +87,9 @@ static int GetVaProfile(AVCodecContext *ctx, const es_format_t *fmt,
         count = 18;
         break;
     case AV_CODEC_ID_HEVC:
-        if (fmt->i_profile == FF_PROFILE_HEVC_MAIN)
+        if (ctx->profile == FF_PROFILE_HEVC_MAIN)
             i_profile = VAProfileHEVCMain;
-        else if (fmt->i_profile == FF_PROFILE_HEVC_MAIN_10)
+        else if (ctx->profile == FF_PROFILE_HEVC_MAIN_10)
         {
             i_profile = VAProfileHEVCMain10;
             i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7c897c4dd89ce8593b5c3c26a1192a927f6b95b0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7c897c4dd89ce8593b5c3c26a1192a927f6b95b0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list