diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-01-15 20:21:15 +0300 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-01-15 20:21:15 +0300 |
commit | 6baf4afa9969eea23cd4ec9b0cec3b7aed1f49af (patch) | |
tree | 2b2470166a85177b3abe2075ca9444590b603c36 /libavfilter | |
parent | 24d13ebc15ea429607ccbd52819947162981d333 (diff) |
Make avfilter_unref_buffer() accept a NULL parameter.
Originally committed as revision 26373 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfilter.c | 2 | ||||
-rw-r--r-- | libavfilter/avfilter.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 6ecd4ce4c2..4fbb6bf4a6 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -70,6 +70,8 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask) void avfilter_unref_buffer(AVFilterBufferRef *ref) { + if (!ref) + return; if (!(--ref->buf->refcount)) ref->buf->free(ref->buf); av_free(ref->video); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index a3c51e0b49..5b08941693 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -28,7 +28,7 @@ #define LIBAVFILTER_VERSION_MAJOR 1 #define LIBAVFILTER_VERSION_MINOR 73 -#define LIBAVFILTER_VERSION_MICRO 1 +#define LIBAVFILTER_VERSION_MICRO 2 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ @@ -177,7 +177,7 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask); * Remove a reference to a buffer. If this is the last reference to the * buffer, the buffer itself is also automatically freed. * - * @param ref reference to the buffer + * @param ref reference to the buffer, may be NULL */ void avfilter_unref_buffer(AVFilterBufferRef *ref); |