[vlc-commits] videotoolbox: add legacy error codes printing

Marvin Scholz git at videolan.org
Fri Aug 14 11:31:46 CEST 2020


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Aug  7 15:13:34 2020 +0200| [462f4044e12ccde0eb5928467d46b3a76ccd2066] | committer: Marvin Scholz

videotoolbox: add legacy error codes printing

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

 modules/codec/videotoolbox.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c
index 5e5b30f0a2..13689d3e70 100644
--- a/modules/codec/videotoolbox.c
+++ b/modules/codec/videotoolbox.c
@@ -1681,6 +1681,9 @@ static int HandleVTStatus(decoder_t *p_dec, OSStatus status,
 #define VTERRCASE(x) \
     case x: msg_Warn(p_dec, "vt session error: '" #x "'"); break;
 
+#define VTERRCASE_LEGACY(code, name) \
+    case code: msg_Warn(p_dec, "vt session error: '" name "'"); break;
+
     switch (status)
     {
         case noErr:
@@ -1716,10 +1719,17 @@ static int HandleVTStatus(decoder_t *p_dec, OSStatus status,
         VTERRCASE(kVTCouldNotFindTemporalFilterErr)
         VTERRCASE(kVTPixelTransferNotPermittedErr)
         VTERRCASE(kVTColorCorrectionImageRotationFailedErr)
+
+        /* Legacy error codes defined in the old Carbon MacErrors.h */
+        VTERRCASE_LEGACY(-8960, "codecErr")
+        VTERRCASE_LEGACY(-8961, "noCodecErr")
+        VTERRCASE_LEGACY(-8969, "codecBadDataErr")
+        VTERRCASE_LEGACY(-8973, "codecOpenErr")
         default:
             msg_Warn(p_dec, "unknown vt session error (%i)", (int)status);
     }
 #undef VTERRCASE
+#undef VTERRCASE_LEGACY
 
     if (p_vtsession_status)
     {



More information about the vlc-commits mailing list