[FFmpeg-devel] [PATCH v6 1/2] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

Moritz Barsnick barsnick at gmx.net
Thu Jul 25 17:00:44 EEST 2019


On Thu, Jul 25, 2019 at 15:12:52 +0300, velocityra at gmail.com wrote:
> From: Nick Renieris <velocityra at gmail.com>

Nit:

> -    if (s->nb_components != 3 && s->nb_components != 4)
> +    if (s->nb_components <= 0 || s->nb_components > 4)
>          return AVERROR_INVALIDDATA;
> +
>      if (s->v_max != 1 || s->h_max != 1 || !s->lossless)
>          return AVERROR_INVALIDDATA;
>
> -
>      s->restart_count = s->restart_interval;

Arbitrary addition and removal of newlines.

> +        if (mb_y * s->width % s->restart_interval == 0) {

I personally would prefer an extra set of brackets to at least make it
more obvious which operation takes precedence.

Cheers,
Moritz


More information about the ffmpeg-devel mailing list