History

avfilter/avf_concat: Free pads' names generically

Andreas Rheinhardt committed 5 years ago

Commit fbfcb011 parent f28db2c1 file · +2 −11Browse files

Unified · Split

libavfilter/avf_concat.c+2−11
@@ -319,10 +319,8 @@ static av_cold int init(AVFilterContext *ctx) · 318 unmodified lines
319 else319 else
320 pad.get_buffer.audio = get_audio_buffer;320 pad.get_buffer.audio = get_audio_buffer;
321 pad.name = av_asprintf("in%d:%c%d", seg, "va"[type], str);321 pad.name = av_asprintf("in%d:%c%d", seg, "va"[type], str);
322 if ((ret = ff_append_inpad(ctx, &pad)) < 0) {322 if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0)
323 av_freep(&pad.name);
324 return ret;323 return ret;
325 }
326 }324 }
327 }325 }
328 }326 }
@@ -334,10 +332,8 @@ static av_cold int init(AVFilterContext *ctx) · 5 unmodified lines
334 .config_props = config_output,332 .config_props = config_output,
335 };333 };
336 pad.name = av_asprintf("out:%c%d", "va"[type], str);334 pad.name = av_asprintf("out:%c%d", "va"[type], str);
337 if ((ret = ff_append_outpad(ctx, &pad)) < 0) {335 if ((ret = ff_append_outpad_free_name(ctx, &pad)) < 0)
338 av_freep(&pad.name);
339 return ret;336 return ret;
340 }
341 }337 }
342 }338 }
343 339
@@ -351,12 +347,7 @@ static av_cold int init(AVFilterContext *ctx) · 7 unmodified lines
351static av_cold void uninit(AVFilterContext *ctx)347static av_cold void uninit(AVFilterContext *ctx)
352{348{
353 ConcatContext *cat = ctx->priv;349 ConcatContext *cat = ctx->priv;
354 unsigned i;
355 350
356 for (i = 0; i < ctx->nb_inputs; i++)
357 av_freep(&ctx->input_pads[i].name);
358 for (i = 0; i < ctx->nb_outputs; i++)
359 av_freep(&ctx->output_pads[i].name);
360 av_freep(&cat->in);351 av_freep(&cat->in);
361}352}
362 353

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