[FFmpeg-devel] [PATCH] avfilter/vf_lut3d: actually skip lines when encountering DOMAIN_ string

Clément Bœsch u at pkh.me
Sun Mar 12 21:02:45 EET 2017


On Sun, Mar 12, 2017 at 07:00:32PM +0100, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavfilter/vf_lut3d.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c
> index b136cda..7a294b0 100644
> --- a/libavfilter/vf_lut3d.c
> +++ b/libavfilter/vf_lut3d.c
> @@ -320,6 +320,7 @@ static int parse_cube(AVFilterContext *ctx, FILE *f)
>                          struct rgbvec *vec = &lut3d->lut[i][j][k];
>  
>                          do {
> +try_again:
>                              NEXT_LINE(0);
>                              if (!strncmp(line, "DOMAIN_", 7)) {
>                                  float *vals = NULL;
> @@ -330,7 +331,7 @@ static int parse_cube(AVFilterContext *ctx, FILE *f)
>                                  sscanf(line + 11, "%f %f %f", vals, vals + 1, vals + 2);
>                                  av_log(ctx, AV_LOG_DEBUG, "min: %f %f %f | max: %f %f %f\n",
>                                         min[0], min[1], min[2], max[0], max[1], max[2]);
> -                                continue;
> +                                goto try_again;
>                              }
>                          } while (skip_line(line));
>                          if (sscanf(line, "%f %f %f", &vec->r, &vec->g, &vec->b) != 3)

meh.

I would prefer a loop_again var to be used in the while condition, but
fine with me.

Thanks

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170312/ca0a6dfb/attachment.sig>


More information about the ffmpeg-devel mailing list