[vlc-devel] [PATCH 06/10] avcodec: vaapi: set the i_chroma corresponding to the decoded format
Steve Lhomme
robux4 at ycbcr.xyz
Wed Dec 18 15:53:09 CET 2019
---
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 530f0b98225..41136dc85a5 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;
--
2.17.1
More information about the vlc-devel
mailing list