History

avfilter/avf_concat: Free pads' names generically

Andreas Rheinhardt committed 5 years ago

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

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/avf_concat.c+2−11
@@ -319,10 +319,8 @@ static av_cold int init(AVFilterContext *ctx) · 318 unmodified lines
319319 else
320320 pad.get_buffer.audio = get_audio_buffer;
321321 pad.name = av_asprintf("in%d:%c%d", seg, "va"[type], str);
322− if ((ret = ff_append_inpad(ctx, &pad)) < 0) {
323− av_freep(&pad.name);
322+ if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0)
324323 return ret;
325− }
326324 }
327325 }
328326 }
@@ -334,10 +332,8 @@ static av_cold int init(AVFilterContext *ctx) · 5 unmodified lines
334332 .config_props = config_output,
335333 };
336334 pad.name = av_asprintf("out:%c%d", "va"[type], str);
337− if ((ret = ff_append_outpad(ctx, &pad)) < 0) {
338− av_freep(&pad.name);
335+ if ((ret = ff_append_outpad_free_name(ctx, &pad)) < 0)
339336 return ret;
340− }
341337 }
342338 }
343339
@@ -351,12 +347,7 @@ static av_cold int init(AVFilterContext *ctx) · 7 unmodified lines
351347 static av_cold void uninit(AVFilterContext *ctx)
352348 {
353349 ConcatContext *cat = ctx->priv;
354− unsigned i;
355350
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);
360351 av_freep(&cat->in);
361352 }
362353

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