Re: Small bug in subgen-image.c

Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]>
Newsgroups gmane.comp.multimedia.dvdauthor.user
Message-ID <[email protected]>
On 21/06/10 23:47, Niels Horn wrote:

> I've been using dvdauthor in combination with tovid and discovered
> that it sometimes gives an error about png images being too big, while
> they aren't.

On a 64-bit architecture, presumably? Big-endian, by any chance? (Just 
wondering why I never noticed this on my AMD64 machine.)

> The following patch (against the stable 0.6.18 version) solves it:

Thanks for that.

> @@ -271,7 +271,7 @@
>       assert(bit_depth==8); // 8bpp, not 1, 2, 4, or 16
>       assert(!(color_type&PNG_COLOR_MASK_PALETTE)); // not a palette
>       if( width>MAXX || height>MAXY ) {
> -        fprintf(stderr,"ERR: PNG %s is too big:
> %lux%lu\n",s->fname,width,height);
> +        fprintf(stderr,"ERR: PNG %s is too big:
> %lux%lu\n",s->fname,(long unsigned int)width,(long unsigned
> int)height);
>           png_destroy_read_struct(&ps,&pi,NULL);
>           return -1;
>       }

I would dispense with the casts, and take out the “l” modifiers on the 
format specifiers.

Normally I prefer to discuss patches on dvdauthor-developer: that’s the 
list for the technicalities of the source code, this list is for the 
technicalities of using the code.

Though I admit things might get blurred sometime...

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Dvdauthor-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvdauthor-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.