History

avfilter/vf_minterpolate: Remove redundant code for freeing

ad73b32d2922f4237405043d19763229aee0e59e added some code for freeing in the input's config_props function, yet this is unnecessary as uninit is called anyway if config_props fails.

Andreas Rheinhardt committed 6 years ago

Commit 358c0bb1 parent aa262dc1 file · +3 −12Browse files

Unified · Split

libavfilter/vf_minterpolate.c+3−12
@@ -340,7 +340,7 @@ static int config_input(AVFilterLink *inlink) · 339 unmodified lines
340 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);340 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
341 const int height = inlink->h;341 const int height = inlink->h;
342 const int width = inlink->w;342 const int width = inlink->w;
343 int i, ret = 0;343 int i;
344 344
345 mi_ctx->log2_chroma_h = desc->log2_chroma_h;345 mi_ctx->log2_chroma_h = desc->log2_chroma_h;
346 mi_ctx->log2_chroma_w = desc->log2_chroma_w;346 mi_ctx->log2_chroma_w = desc->log2_chroma_w;
@@ -380,10 +380,8 @@ static int config_input(AVFilterLink *inlink) · 33 unmodified lines
380 mi_ctx->pixel_mvs = av_mallocz_array(width * height, sizeof(PixelMVS));380 mi_ctx->pixel_mvs = av_mallocz_array(width * height, sizeof(PixelMVS));
381 mi_ctx->pixel_weights = av_mallocz_array(width * height, sizeof(PixelWeights));381 mi_ctx->pixel_weights = av_mallocz_array(width * height, sizeof(PixelWeights));
382 mi_ctx->pixel_refs = av_mallocz_array(width * height, sizeof(PixelRefs));382 mi_ctx->pixel_refs = av_mallocz_array(width * height, sizeof(PixelRefs));
383 if (!mi_ctx->pixel_mvs || !mi_ctx->pixel_weights || !mi_ctx->pixel_refs) {383 if (!mi_ctx->pixel_mvs || !mi_ctx->pixel_weights || !mi_ctx->pixel_refs)
384 ret = AVERROR(ENOMEM);384 return AVERROR(ENOMEM);
385 goto fail;
386 }
387 385
388 if (mi_ctx->me_mode == ME_MODE_BILAT)386 if (mi_ctx->me_mode == ME_MODE_BILAT)
389 if (!(mi_ctx->int_blocks = av_mallocz_array(mi_ctx->b_count, sizeof(Block))))387 if (!(mi_ctx->int_blocks = av_mallocz_array(mi_ctx->b_count, sizeof(Block))))
@@ -405,13 +403,6 @@ static int config_input(AVFilterLink *inlink) · 15 unmodified lines
405 }403 }
406 404
407 return 0;405 return 0;
408fail:
409 for (i = 0; i < NB_FRAMES; i++)
410 av_freep(&mi_ctx->frames[i].blocks);
411 av_freep(&mi_ctx->pixel_mvs);
412 av_freep(&mi_ctx->pixel_weights);
413 av_freep(&mi_ctx->pixel_refs);
414 return ret;
415}406}
416 407
417static int config_output(AVFilterLink *outlink)408static int config_output(AVFilterLink *outlink)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t