Browse Source

lavfi/unsharp: add missing NULL check

tags/n1.2
Stefano Sabatini 13 years ago
parent
commit
89505f2c3f
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavfilter/vf_unsharp.c

+ 2
- 1
libavfilter/vf_unsharp.c View File

@@ -216,7 +216,8 @@ static int init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char *
effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0);

for (z = 0; z < 2 * fp->steps_y; z++)
fp->sc[z] = av_malloc(sizeof(*(fp->sc[z])) * (width + 2 * fp->steps_x));
if (!(fp->sc[z] = av_malloc(sizeof(*(fp->sc[z])) * (width + 2 * fp->steps_x))))
return AVERROR(ENOMEM);

return 0;
}


Loading…
Cancel
Save