[vlc-devel] [PATCH 1/2] video_output: allow 0/0 user aspect ratio
Steve Lhomme
robux4 at ycbcr.xyz
Mon Oct 12 15:35:10 CEST 2020
On 2020-10-12 15:30, Rémi Denis-Courmont wrote:
> Hi,
>
> The patch and the description don't seem to match. The patch allows the
> empty string has a ratio.
Yes.
libvlc allows NULL to reset the aspect ratio, which is turned into "".
That's also the default/reset value for the aspect ratio in vout_intf.c:
{ "", N_("Default") },
> Le 12 octobre 2020 16:14:04 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a
> écrit :
>
> We need to tell the core when the user wants to use the default (source) aspect
> ratio, rather than one it sets before.
> ------------------------------------------------------------------------
> src/video_output/vout_intf.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
> index 6446fd916cf..1c8159ce21e 100644
> --- a/src/video_output/vout_intf.c
> +++ b/src/video_output/vout_intf.c
> @@ -528,8 +528,10 @@ bool GetAspectRatio(const char *ar_str, unsigned *num, unsigned *den)
> if (sscanf(ar_str, "%u:%u", num, den) == 2 &&
> (num != 0) == (den != 0))
> return true;
> - else if (*ar_str == '\0')
> + else if (*ar_str == '\0') {
> *num = *den = 0;
> + return true;
> + }
> return false;
> }
>
>
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser
> ma brièveté.
>
> _______________________________________________
> 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