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

Thomas Guillem git at videolan.org
Fri Apr 20 17:29:49 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Apr 20 17:17:19 2018 +0200| [2af423e59496b52267949b0e77a692a844bc5c38] | committer: Thomas Guillem

videotoolbox: always abort in case of BadDataErr

It's safer to fallback to SW dec the earliest possible since the stream is
likely to contain more problematic data.

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

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

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 04e57dfe39..37f64ac9d0 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1773,11 +1773,11 @@ static int HandleVTStatus(decoder_t *p_dec, OSStatus status,
                 break;
             case -8960 /* codecErr */:
             case kVTVideoDecoderMalfunctionErr:
-            case -8969 /* codecBadDataErr */:
-            case kVTVideoDecoderBadDataErr:
             case kVTInvalidSessionErr:
                 *p_vtsession_status = VTSESSION_STATUS_RESTART;
                 break;
+            case -8969 /* codecBadDataErr */:
+            case kVTVideoDecoderBadDataErr:
             default:
                 *p_vtsession_status = VTSESSION_STATUS_ABORT;
                 break;



More information about the vlc-commits mailing list