[vlc-commits] avcodec: va: use the check function to tell if we should try the VA flavor
Steve Lhomme
git at videolan.org
Wed Jan 8 08:28:10 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Dec 18 09:34:28 2019 +0100| [0ddd9415c9b70ef763df22d2f6f18f1953ff2994] | committer: Steve Lhomme
avcodec: va: use the check function to tell if we should try the VA flavor
No need to set the i_chroma if we're not going to use it
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ddd9415c9b70ef763df22d2f6f18f1953ff2994
---
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 533bc3c550..bb540dd750 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1742,9 +1742,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");
More information about the vlc-commits
mailing list