[FFmpeg-cvslog] Write aspect ratio when muxing gif.
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu Apr 3 23:48:35 CEST 2014
Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
> On 02.04.2014, at 22:53, Carl Eugen Hoyos wrote:
>
> > + if (sar.num > 0 && sar.den > 0) {
> > + aspect = sar.num * 64 / sar.den - 15;
> > + if (aspect < 0 || aspect > 255)
> > + aspect = 0;
> > + }
>
> Not a big deal, but have you considered clamping to
> 1..255 instead of setting to 0? Because I find it a
> bit strange that like this 0.5 aspect would work,
> but 0.1 suddenly will look like no aspect again.
Imo, we should not set an aspect ratio if it is
not correct, but I may miss something...
> Also, strictly speaking I think there is no
> guarantee that sar.num * 64 does not overflow.
I am currently trying to fix this.
Thank you!
Carl Eugen
More information about the ffmpeg-cvslog
mailing list