@@ -306,10 +306,8 @@ static av_cold int movie_common_init(AVFilterContext *ctx)
return AVERROR(ENOMEM);
pad.config_props = movie_config_output_props;
pad.request_frame = movie_request_frame;
- if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) {
- av_freep(&pad.name);
+ if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0)
return ret;
- }
if ( movie->st[i].st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
!movie->st[i].st->codecpar->channel_layout) {
ret = guess_channel_layout(&movie->st[i], i, ctx);
@@ -334,7 +332,6 @@ static av_cold void movie_uninit(AVFilterContext *ctx)
int i;
for (i = 0; i < ctx->nb_outputs; i++) {
- av_freep(&ctx->output_pads[i].name);
if (movie->st[i].st)
avcodec_free_context(&movie->st[i].codec_ctx);
}
@@ -649,6 +646,7 @@ const AVFilter ff_avsrc_movie = {
.inputs = NULL,
.outputs = NULL,
.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
+ .flags_internal = FF_FILTER_FLAG_FREE_OUTPADS,
.process_command = process_command
};
@@ -671,6 +669,7 @@ const AVFilter ff_avsrc_amovie = {
.outputs = NULL,
.priv_class = &amovie_class,
.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
+ .flags_internal = FF_FILTER_FLAG_FREE_OUTPADS,
.process_command = process_command,
};
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/src_movie.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)