From 462f4044e12ccde0eb5928467d46b3a76ccd2066 Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Fri, 7 Aug 2020 15:13:34 +0200 Subject: [PATCH] videotoolbox: add legacy error codes printing --- 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) { -- 2.11.4.GIT