[vlc-commits] videotoolbox: always abort in case of unknown errors

Thomas Guillem git at videolan.org
Fri Mar 9 13:45:00 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar  9 13:02:27 2018 +0100| [f7df6eb7fba5661e9ed484194982af20bc31edcc] | committer: Thomas Guillem

videotoolbox: always abort in case of unknown errors

Better to fallback to avcodec in that case.

(cherry picked from commit da295d94d11518087dac0d21633ae62a1fba1b22)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/codec/videotoolbox.m | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 8e0c99ae5c..9a805b4457 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1763,10 +1763,6 @@ static int HandleVTStatus(decoder_t *p_dec, OSStatus status,
     {
         switch (status)
         {
-            case kVTParameterErr:
-            case kCVReturnInvalidArgument:
-                *p_vtsession_status = VTSESSION_STATUS_ABORT;
-                break;
             case kVTPixelTransferNotSupportedErr:
             case kVTPixelTransferNotPermittedErr:
                 *p_vtsession_status = VTSESSION_STATUS_RESTART_CHROMA;
@@ -1779,7 +1775,7 @@ static int HandleVTStatus(decoder_t *p_dec, OSStatus status,
                 *p_vtsession_status = VTSESSION_STATUS_RESTART;
                 break;
             default:
-                *p_vtsession_status = VTSESSION_STATUS_OK;
+                *p_vtsession_status = VTSESSION_STATUS_ABORT;
                 break;
         }
     }



More information about the vlc-commits mailing list