[vlc-devel] [PATCH 6/8] d3d11va: return the VideoProcessor output in setup()
Steve Lhomme
robux4 at videolabs.io
Tue Sep 6 11:52:38 CEST 2016
---
modules/codec/avcodec/d3d11va.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 17b3ca8..6e6a54a 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -168,7 +168,13 @@ static void Setup(vlc_va_t *va, vlc_fourcc_t *chroma)
{
vlc_va_sys_t *sys = va->sys;
- *chroma = sys->filter == NULL ? sys->i_chroma : VLC_CODEC_YV12;
+ if (sys->videoProcessor != NULL)
+ *chroma = DxgiFormatFourcc(sys->processorFormat);
+ else if (sys->filter != NULL)
+ *chroma = VLC_CODEC_YV12;
+ else
+ *chroma = sys->i_chroma;
+
}
void SetupAVCodecContext(vlc_va_t *va)
@@ -940,7 +946,11 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *
}
msg_Dbg(va, "Using output format %s for decoder %s", DxgiFormatToStr(processorInput[idx]), psz_decoder_name);
- va->sys->render = processorInput[idx];
+ if (va->sys->render != processorInput[idx])
+ {
+ va->sys->render = processorInput[idx];
+ va->sys->i_chroma = DxgiFormatFourcc(processorInput[idx]);
+ }
free(psz_decoder_name);
return VLC_SUCCESS;
}
--
2.8.2
More information about the vlc-devel
mailing list