[vlc-commits] avcodec: vaapi: set the i_chroma corresponding to the decoded format

Steve Lhomme git at videolan.org
Wed Jan 8 08:28:15 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Dec 18 14:51:05 2019 +0100| [8b88acf8b746aba1e07b447a962bbfc88ebc4da6] | committer: Steve Lhomme

avcodec: vaapi: set the i_chroma corresponding to the decoded format

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8b88acf8b746aba1e07b447a962bbfc88ebc4da6
---

 modules/codec/avcodec/vaapi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index 530f0b9822..41136dc85a 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -269,9 +269,6 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat hwfmt, con
     sys->hw_ctx.context_id = VA_INVALID_ID;
     va->sys = sys;
 
-    video_format_t fmt_video = fmt_in->video;
-    fmt_video.i_chroma = i_vlc_chroma;
-
     struct va_pool_cfg pool_cfg = {
         VAAPICreateDevice,
         VAAPIDestroyDevice,
@@ -283,7 +280,8 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat hwfmt, con
     if (sys->va_pool == NULL)
         goto error;
 
-    int err = va_pool_SetupDecoder(va, sys->va_pool, ctx, &fmt_video, count);
+    fmt_out->i_chroma = i_vlc_chroma;
+    int err = va_pool_SetupDecoder(va, sys->va_pool, ctx, fmt_out, count);
     if (err != VLC_SUCCESS)
         goto error;
 



More information about the vlc-commits mailing list