[FFmpeg-devel] [PATCH] Fix gif decoder max option

Soft Works softworkz at hotmail.com
Tue Sep 17 04:24:22 EEST 2019


> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> James Almer
> Sent: Tuesday, September 17, 2019 3:11 AM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] Fix gif decoder max option
> 
> On 9/16/2019 10:05 PM, Soft Works wrote:
> > An int32 option cannot have a maximum of UINT32_MAX
> 
> AV_OPT_TYPE_INT options are int64_t. In this case however the storage
> type for trans_color in GifState is int.
> 
> Reading the code i see it's intended to be uint32_t, so i think the correct fix is
> changing its storage type, and not limiting its allowed range. Same with
> stored_bg_color.

Hi James,

Thanks for looking into this.

The purpose of this option is to indicate a "replacement color" for transparent pixels.
Such a replacement color itself can never have an alpha component.

I was unsure how to indicate this. Maybe, by setting the maximum to 0x00FFFFFF ?

softworkz


More information about the ffmpeg-devel mailing list