Make avfilter_graph_free() free the graph.

Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.

Simplify usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4359288c565705d1734f63d277f8918ee5af5e54)
This commit is contained in:
Stefano Sabatini
2011-02-01 20:02:17 +01:00
committed by Michael Niedermayer
parent c68be8e135
commit ab543afe47
4 changed files with 12 additions and 14 deletions

View File

@ -1899,8 +1899,7 @@ static int video_thread(void *arg)
}
the_end:
#if CONFIG_AVFILTER
avfilter_graph_free(graph);
av_freep(&graph);
avfilter_graph_free(&graph);
#endif
av_free(frame);
return 0;