[vlc-commits] videotoolbox: abort if no vout handle CVPX chroma

Thomas Guillem git at videolan.org
Thu Oct 12 10:57:55 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Oct 12 10:42:44 2017 +0200| [0b91e9951dfab80c24a0a74ce846fcda14a74d95] | committer: Thomas Guillem

videotoolbox: abort if no vout handle CVPX chroma

Fixes #18537

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

 modules/codec/videotoolbox.m | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 800a36e328..f460f56133 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1609,7 +1609,12 @@ static int UpdateVideoFormat(decoder_t *p_dec, CVPixelBufferRef imageBuffer)
             p_dec->p_sys->vtsession_status = VTSESSION_STATUS_ABORT;
             return -1;
     }
-    return decoder_UpdateVideoFormat(p_dec);
+    if (decoder_UpdateVideoFormat(p_dec) != 0)
+    {
+        p_dec->p_sys->vtsession_status = VTSESSION_STATUS_ABORT;
+        return -1;
+    }
+    return 0;
 }
 
 static void DecoderCallback(void *decompressionOutputRefCon,



More information about the vlc-commits mailing list