diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-31 08:48:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-31 08:48:23 +0200 |
commit | c5f9a66f7453f44d0bf612ad3c5e98e7309cdf86 (patch) | |
tree | 8441a1937ecf0307162d219f32e6dfaf811a30cb /libavfilter/avfilter.c | |
parent | a79af8e8cb6b33a9b33b3947a43efe64a00b11e4 (diff) | |
download | ffmpeg-c5f9a66f7453f44d0bf612ad3c5e98e7309cdf86.tar.gz |
avfilter: allow freeing NULL.
this way avfilter_free() can be called without NULL checks.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 706f7e2694..141fb9d7ca 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -834,6 +834,9 @@ void avfilter_free(AVFilterContext *filter) int i; AVFilterLink *link; + if (!filter) + return; + if (filter->filter->uninit) filter->filter->uninit(filter); |