[vlc-commits] [Git][videolan/vlc][master] avcodec: vdpau: do not rely on AVCodecContext->refs for HEVC

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Jul 1 11:13:30 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
c7227ecf by Steve Lhomme at 2021-07-01T10:37:37+00:00
avcodec: vdpau: do not rely on AVCodecContext->refs for HEVC

lavc doesn't set this value to a meaningful value. Only the H264 codec
has this value properly set.

Bogus log introduced in 7905bf1eba6b38d8456f414478cfe6809a07614f.
Before the code would rely on refs which is one and add 5 arbitrary pictures
which was OK until HEVC and VP9 were introduced.

- - - - -


1 changed file:

- modules/hw/vdpau/avcodec.c


Changes:

=====================================
modules/hw/vdpau/avcodec.c
=====================================
@@ -189,10 +189,12 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum AVPixelFormat hwfmt, c
     unsigned codec_refs;
     switch (avctx->codec_id)
     {
-        case AV_CODEC_ID_HEVC:
         case AV_CODEC_ID_H264:
             codec_refs = avctx->refs; // we can rely on this
             break;
+        case AV_CODEC_ID_HEVC:
+            codec_refs = 16;
+            break;
         case AV_CODEC_ID_VP9:
             codec_refs = 8;
             break;



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

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




More information about the vlc-commits mailing list