[vlc-devel] [PATCH] videotoolbox: add legacy error codes printing

Felix Paul Kühne fkuehne at videolan.org
Thu Aug 13 21:49:31 CEST 2020


LGTM.

> On 7. Aug 2020, at 15:13, Marvin Scholz <epirat07 at gmail.com> wrote:
> 
> ---
> modules/codec/videotoolbox.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
> 
> diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c
> index 5e5b30f0a27..13689d3e70a 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.24.3 (Apple Git-128)
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list