Skip to content

Commit

Permalink
Plug memory leak when printing filter graph. (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
j0sh authored Aug 19, 2024
1 parent 20131b6 commit 9d6ea5f
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 @@ -113,8 +113,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 9d6ea5f

Please sign in to comment.