[vlc-devel] [PATCH 07/28] core: change var_InheritURational to output a vlc_rational_t
Filip Roséen
filip at atch.se
Mon Apr 3 10:04:39 CEST 2017
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.
I might be tired, but I can still distinguish an underscore from a
dot! `;-)`
Best Regards,\
Filip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170403/02dafbc7/attachment.html>
More information about the vlc-devel
mailing list