Commit 6baf4afa authored by Stefano Sabatini's avatar Stefano Sabatini

Make avfilter_unref_buffer() accept a NULL parameter.

Originally committed as revision 26373 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 24d13ebc
...@@ -70,6 +70,8 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask) ...@@ -70,6 +70,8 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
void avfilter_unref_buffer(AVFilterBufferRef *ref) void avfilter_unref_buffer(AVFilterBufferRef *ref)
{ {
if (!ref)
return;
if (!(--ref->buf->refcount)) if (!(--ref->buf->refcount))
ref->buf->free(ref->buf); ref->buf->free(ref->buf);
av_free(ref->video); av_free(ref->video);
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define LIBAVFILTER_VERSION_MAJOR 1 #define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 73 #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, \ #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \ LIBAVFILTER_VERSION_MINOR, \
...@@ -177,7 +177,7 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask); ...@@ -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 * Remove a reference to a buffer. If this is the last reference to the
* buffer, the buffer itself is also automatically freed. * 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); void avfilter_unref_buffer(AVFilterBufferRef *ref);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment