[vlc-commits] [Git][videolan/vlc][3.0.x] directx_va: only call profile readers if we don't have one

Jean-Baptiste Kempf gitlab at videolan.org
Sat Jun 26 12:13:51 UTC 2021



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
cb1e02fb by Steve Lhomme at 2021-06-24T12:57:01+02:00
directx_va: only call profile readers if we don't have one

That's how MediaCodec does it. These readers can be wrong so rely on lavc
and container values instead.

Fixes #25850

(cherry picked from commit a69b492a6272c84b9c2efa912ad0b1dc612a2b83) (edited)
edited:
- the 3.0 branch sets the is_supported later

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


1 changed file:

- modules/codec/avcodec/directx_va.c


Changes:

=====================================
modules/codec/avcodec/directx_va.c
=====================================
@@ -365,13 +365,13 @@ static bool profile_supported(const directx_va_mode_t *mode, const es_format_t *
     if (!is_supported)
     {
         int profile = fmt->i_profile >= 0 ? fmt->i_profile : avctx->profile;
-        if (mode->codec == AV_CODEC_ID_H264)
+        if (mode->codec == AV_CODEC_ID_H264 && profile == -1)
         {
             uint8_t h264_profile;
             if ( h264_get_profile_level(fmt, &h264_profile, NULL, NULL) )
                 profile = h264_profile;
         }
-        if (mode->codec == AV_CODEC_ID_HEVC)
+        if (mode->codec == AV_CODEC_ID_HEVC && profile == -1)
         {
             uint8_t hevc_profile;
             if (hevc_get_profile_level(fmt, &hevc_profile, NULL, NULL) )



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

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




More information about the vlc-commits mailing list