diff --git a/ffmpeg/filter.c b/ffmpeg/filter.c index 9bacc1ec46..7d9914c1e6 100644 --- a/ffmpeg/filter.c +++ b/ffmpeg/filter.c @@ -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");