[FFmpeg-devel] [PATCH] IFF: Check for invalid width and height in decoder
Ronald S. Bultje
rsbultje
Mon May 10 16:07:04 CEST 2010
Hi,
On Mon, May 10, 2010 at 9:58 AM, Sebastian Vater
<cdgs.basty at googlemail.com> wrote:
> Ronald S. Bultje a ?crit :
>> On Mon, May 10, 2010 at 9:48 AM, Sebastian Vater
>> <cdgs.basty at googlemail.com> wrote:
>>> + ? ?if ( (err = avcodec_check_dimensions(avctx, avctx->width, avctx->height)) )
>>> + ? ? ? ?return err;
>>
>> Now without the ( ( ( spaces. OK otherwise.
>
> I wanted to do this, too. But thought it could be a nice remember that
> the = instead of == is really wanted here.
[..]
> + if (err = avcodec_check_dimensions(avctx, avctx->width, avctx->height) )
> + return err;
I think we misunderstand. The extra (..) are required, gcc will warn
without them. The extra spaces around the ( and ) are not.
What we usually do is this:
if ((err = avcodec_check_dimensions(avctx, avctx->width, avctx->height)))
return err;
Ronald
More information about the ffmpeg-devel
mailing list