[vlc-commits] videotoolbox: don't ignore StartVideoToolbox() return

Thomas Guillem git at videolan.org
Wed Dec 13 16:17:42 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec 13 15:51:36 2017 +0100| [376de21e0f84fdb52f1401277befd9e36f1d1c8a] | committer: Thomas Guillem

videotoolbox: don't ignore StartVideoToolbox() return

And abort if the vtsession can't handle a profile/level.

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

 modules/codec/videotoolbox.m | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 6c8420250b..1134a1e554 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1849,11 +1849,8 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
 
         if(!p_sys->session)
         {
-            if(!p_sys->pf_codec_supported || p_sys->pf_codec_supported(p_dec))
-            {
-                StartVideoToolbox(p_dec);
-            }
-            else
+            if ((p_sys->pf_codec_supported && !p_sys->pf_codec_supported(p_dec))
+              || StartVideoToolbox(p_dec) != VLC_SUCCESS)
             {
                 /* The current device doesn't handle the profile/level, abort */
                 vlc_mutex_lock(&p_sys->lock);



More information about the vlc-commits mailing list