Skip to content

Commit

Permalink
Plug memory leak when printing filter graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
j0sh committed Aug 16, 2024
1 parent 409f6e0 commit 4c1d0da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ffmpeg/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ int init_video_filters(struct input_ctx *ictx, struct output_ctx *octx)
ret = avfilter_graph_config(vf->graph, NULL);
if (ret < 0) LPMS_ERR(vf_init_cleanup, "Unable configure video filtergraph");

char *dumped_graph = avfilter_graph_dump(vf->graph, NULL);
LPMS_DEBUG("Initialized filtergraph: ");
LPMS_DEBUG(avfilter_graph_dump(vf->graph, NULL));
if (dumped_graph) {
LPMS_DEBUG(dumped_graph);
av_freep(&dumped_graph);
}

vf->frame = av_frame_alloc();
if (!vf->frame) LPMS_ERR(vf_init_cleanup, "Unable to allocate video frame");
Expand Down

0 comments on commit 4c1d0da

Please sign in to comment.