[vlc-devel] [vlc-commits] vout/caopengllayer: Fallback to legacy vout on < 10.14

Felix Paul Kühne fkuehne at videolan.org
Sun Mar 22 12:52:51 CET 2020


Hi,

> On 21. Mar 2020, at 21:21, Marvin Scholz <git at videolan.org> wrote:
> 
> vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Mon Mar  2 12:23:52 2020 +0100| [2272cd45c0b5bde35388399c838d29bd78e018be] | committer: Marvin Scholz
> 
> vout/caopengllayer: Fallback to legacy vout on < 10.14
> 
>> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=2272cd45c0b5bde35388399c838d29bd78e018be
> ---
> 
> modules/video_output/caopengllayer.m | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
> 
> diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
> index 629124150b..de363bd3a4 100644
> --- a/modules/video_output/caopengllayer.m
> +++ b/modules/video_output/caopengllayer.m
> @@ -272,6 +272,18 @@ static int Open(vlc_object_t *this)
>         if (sys == NULL)
>             return VLC_ENOMEM;
> 
> +        // Only use this video output on macOS 10.14 or higher
> +        // currently, as it has some issues on at least macOS 10.7
> +        // and the old NSView based output still works fine on old
> +        // macOS versions.
> +        if (@available(macOS 10.14, *)) {
> +            // This is intentionally left empty, as the check
> +            // can not be negated or combined with other conditions!
> +        } else {
> +            if (!vd->obj.force)
> +                return VLC_EGENERIC;
> +        }
> +

Why not use (NSAppKitVersionNumber >= 1639.10) to detect macOS 10.14 and thereby simplify this check?

Best regards,

Felix


More information about the vlc-devel mailing list