[vlc-devel] [PATCH 02/10] avcodec: va: use the check function to tell if we should try the VA flavor
Steve Lhomme
robux4 at ycbcr.xyz
Wed Dec 18 15:53:05 CET 2019
No need to set the i_chroma if we're not going to use it
---
modules/codec/avcodec/video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 22a5ccec65a..570b5dcdfe7 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1736,9 +1736,9 @@ no_reuse:
if( hwfmt == AV_PIX_FMT_NONE )
continue;
- p_dec->fmt_out.video.i_chroma = vlc_va_GetChroma(hwfmt, swfmt);
- if (p_dec->fmt_out.video.i_chroma == 0)
+ if (!vlc_va_MightDecode(hwfmt, swfmt))
continue; /* Unknown brand of hardware acceleration */
+ p_dec->fmt_out.video.i_chroma = vlc_va_GetChroma(hwfmt, swfmt);
if (p_context->width == 0 || p_context->height == 0)
{ /* should never happen */
msg_Err(p_dec, "unspecified video dimensions");
--
2.17.1
More information about the vlc-devel
mailing list