[FFmpeg-cvslog] avfilter: allow freeing NULL.

Michael Niedermayer git at videolan.org
Sat Mar 31 10:30:07 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Mar 31 08:48:23 2012 +0200| [c5f9a66f7453f44d0bf612ad3c5e98e7309cdf86] | committer: Michael Niedermayer

avfilter: allow freeing NULL.

this way avfilter_free() can be called without NULL checks.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5f9a66f7453f44d0bf612ad3c5e98e7309cdf86
---

 libavfilter/avfilter.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 706f7e2..141fb9d 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);
 



More information about the ffmpeg-cvslog mailing list