[vlc-devel] [PATCH 07/28] core: change var_InheritURational to output a vlc_rational_t
Steve Lhomme
robux4 at gmail.com
Mon Apr 3 10:07:24 CEST 2017
On Mon, Apr 3, 2017 at 10:04 AM, Filip Roséen <filip at atch.se> wrote:
> Hi Steve,
>
> On 2017-04-03 09:58, Steve Lhomme wrote:
>
> On Mon, Apr 3, 2017 at 9:52 AM, Filip Roséen <filip at atch.se> wrote:
>
> vlc_rational_t aspect;
> - if (!var_InheritURational(demux, &aspect.num, &aspect.den,
> "decklink-aspect-ratio") &&
> + if (!var_InheritURational(demux, &aspect, "decklink-aspect-ratio")
> &&
> aspect_num > 0 && aspect_den > 0) {
>
> The above leaves usage of aspect_num and aspect_den, even though these are
> no longer written to by var_InheritURational - which cannot be correct.
>
> ??? These variables went away in the previous patch.
>
> Then how come they are still present in the above diff? I am not sure if
> those “???” are directed to me or something else, though.
>
> This is patch 7. In patch 6 you have the following:
>
> - unsigned aspect_num, aspect_den;
> - if (!var_InheritURational(demux, &aspect_num, &aspect_den,
> "decklink-aspect-ratio") &&
> + vlc_rational_t aspect;
> + if (!var_InheritURational(demux, &aspect.num, &aspect.den,
> "decklink-aspect-ratio") &&
> aspect_num > 0 && aspect_den > 0) {
> - video_fmt.video.i_sar_num = aspect_num * video_fmt.video.i_height;
> - video_fmt.video.i_sar_den = aspect_den * video_fmt.video.i_width;
> + video_fmt.video.i_sar_num = aspect.num * video_fmt.video.i_height;
> + video_fmt.video.i_sar_den = aspect.den * video_fmt.video.i_width;
> }
>
> So I have no idea what you mean by "Then how come they are still
> present in the above diff"
>
> I am referring to the below, where aspect_num and aspect_den is still being
> used in the if-condition:
>
> + if (!var_InheritURational(demux, &aspect.num, &aspect.den,
> "decklink-aspect-ratio") &&
> aspect_num > 0 && aspect_den > 0) {
>
> You may confuse aspect_num and aspect.num.
Sorry, I missed it when I did the patch and even when you were trying
to tell me.
> I might be tired, but I can still distinguish an underscore from a dot! ;-)
>
> Best Regards,
> Filip
>
>
> _______________________________________________
> 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