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

Thomas Guillem git at videolan.org
Fri Apr 20 17:31:13 CEST 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Apr 20 17:17:19 2018 +0200| [937864c277a0847b487b5a358606ecc365042532] | 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.

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

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

 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 9a805b4457..2cd2bfd4b9 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1769,11 +1769,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