On Sun, Mar 01, 2015 at 08:07:46PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Sun, Mar 1, 2015 at 7:38 PM, Michael Niedermayer <michae...@gmx.at>
> wrote:
> 
> > alternatively lrint(f)() could be used
> > or various other options
> >
> > Signed-off-by: Michael Niedermayer <michae...@gmx.at>
> > ---
> >  libavcodec/pngenc.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
> > index 9fd8eef..3a94366 100644
> > --- a/libavcodec/pngenc.c
> > +++ b/libavcodec/pngenc.c
> > @@ -231,7 +231,7 @@ static int png_write_row(PNGEncContext *s, const
> > uint8_t *data, int size)
> >      return 0;
> >  }
> >
> > -#define AV_WB32_PNG(buf, n) (AV_WB32(buf, round((n) * 100000)))
> > +#define AV_WB32_PNG(buf, n) (AV_WB32(buf, (unsigned int)round((n) *
> > 100000))
> >
> 
> The typical solution here is to use lrint(f), and that is the C-recommended
> way of converting a double to a integer(ish). So I'd prefer we use that
> instead of this sort of frankenversion of the same concept.

fixed along these lines

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to