[FFmpeg-devel] avfilter: Add avfilter_unref_bufferp
Stefano Sabatini
stefasab at gmail.com
Mon Apr 16 01:25:27 CEST 2012
On date Sunday 2012-04-15 16:49:40 +0200, Robert Nagy encoded:
> Simpler patch.
> From 6e4497a5fa54ccc4a17cddd74bcd42953ca73579 Mon Sep 17 00:00:00 2001
> From: Robert Nagy <ronag89 at gmail.com>
> Date: Sun, 15 Apr 2012 16:36:30 +0200
> Subject: [PATCH] avfilter: Add helper, avfilter_unref_bufferp.
>
> ---
> libavfilter/avfilter.c | 19 +++++++++++++++++++
> libavfilter/avfilter.h | 2 ++
uhm crafted patch? (I ask because I had to apply the other patch by
hand, git was complaining about a corrupted line).
> 2 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index 141fb9d..17b8c78 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -160,6 +160,25 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref)
> av_free(ref);
> }
>
> +void avfilter_unref_bufferp(AVFilterBufferRef **ref)
> +{
> + avfilter_unref_bufferp(*ref);
> + *ref = NULL;
> +}
> +
> void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
> AVFilterPad **pads, AVFilterLink ***links,
> AVFilterPad *newpad)
> diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
> index 9c7a2e5..1ff27f5 100644
> --- a/libavfilter/avfilter.h
> +++ b/libavfilter/avfilter.h
> @@ -187,6 +187,8 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask);
> */
> void avfilter_unref_buffer(AVFilterBufferRef *ref);
>
> +void avfilter_unref_bufferp(AVFilterBufferRef **ref);
> +
Looks fine to me, maybe add some doxy or I'll add it when I'll commit
(I'll wait one/two days since the patch affects public API).
--
FFmpeg = Fierce and Fast Mastodontic Plastic Erratic God
More information about the ffmpeg-devel
mailing list