diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-15 10:12:51 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:05 +0200 |
commit | 02ac7311c8f1f252398b57b54992756c95f77962 (patch) | |
tree | 790402cd02d9c4572b05efeb73bf474aadd3f359 /libavfilter | |
parent | 043800a96888f1a04732f12316ba477d8f098d3f (diff) | |
download | ffmpeg-02ac7311c8f1f252398b57b54992756c95f77962.tar.gz |
lavfi: use avfilter_unref_bufferp() where appropriate.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_join.c | 4 | ||||
-rw-r--r-- | libavfilter/fifo.c | 4 | ||||
-rw-r--r-- | libavfilter/vf_overlay.c | 3 | ||||
-rw-r--r-- | libavfilter/vf_yadif.c | 9 | ||||
-rw-r--r-- | libavfilter/vsrc_movie.c | 3 |
5 files changed, 10 insertions, 13 deletions
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 9ed11a9991..f25ec921dc 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -248,7 +248,7 @@ static void join_uninit(AVFilterContext *ctx) for (i = 0; i < ctx->nb_inputs; i++) { av_freep(&ctx->input_pads[i].name); - avfilter_unref_buffer(s->input_frames[i]); + avfilter_unref_bufferp(&s->input_frames[i]); } av_freep(&s->channels); @@ -402,7 +402,7 @@ static void join_free_buffer(AVFilterBuffer *buf) int i; for (i = 0; i < priv->nb_in_buffers; i++) - avfilter_unref_buffer(priv->in_buffers[i]); + avfilter_unref_bufferp(&priv->in_buffers[i]); av_freep(&priv->in_buffers); av_freep(&buf->priv); diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index 66de62c3b0..8264d5302e 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -65,11 +65,11 @@ static av_cold void uninit(AVFilterContext *ctx) for (buf = fifo->root.next; buf; buf = tmp) { tmp = buf->next; - avfilter_unref_buffer(buf->buf); + avfilter_unref_bufferp(&buf->buf); av_free(buf); } - avfilter_unref_buffer(fifo->buf_out); + avfilter_unref_bufferp(&fifo->buf_out); } static int add_to_queue(AVFilterLink *inlink, AVFilterBufferRef *buf) diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index a0c423de26..951ea7a4f6 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -88,8 +88,7 @@ static av_cold void uninit(AVFilterContext *ctx) { OverlayContext *over = ctx->priv; - if (over->overpicref) - avfilter_unref_buffer(over->overpicref); + avfilter_unref_bufferp(&over->overpicref); } static int query_formats(AVFilterContext *ctx) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 9ac11bf959..1025ba12c7 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -224,8 +224,7 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref) if (yadif->auto_enable && !yadif->cur->video->interlaced) { yadif->out = avfilter_ref_buffer(yadif->cur, AV_PERM_READ); - avfilter_unref_buffer(yadif->prev); - yadif->prev = NULL; + avfilter_unref_bufferp(&yadif->prev); if (yadif->out->pts != AV_NOPTS_VALUE) yadif->out->pts *= 2; return ff_start_frame(ctx->outputs[0], yadif->out); @@ -327,9 +326,9 @@ static av_cold void uninit(AVFilterContext *ctx) { YADIFContext *yadif = ctx->priv; - if (yadif->prev) avfilter_unref_buffer(yadif->prev); - if (yadif->cur ) avfilter_unref_buffer(yadif->cur ); - if (yadif->next) avfilter_unref_buffer(yadif->next); + if (yadif->prev) avfilter_unref_bufferp(&yadif->prev); + if (yadif->cur ) avfilter_unref_bufferp(&yadif->cur ); + if (yadif->next) avfilter_unref_bufferp(&yadif->next); } static int query_formats(AVFilterContext *ctx) diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c index 1fb0495e82..b0f191fe8e 100644 --- a/libavfilter/vsrc_movie.c +++ b/libavfilter/vsrc_movie.c @@ -299,8 +299,7 @@ static int request_frame(AVFilterLink *outlink) ret = ff_end_frame(outlink); fail: - avfilter_unref_buffer(movie->picref); - movie->picref = NULL; + avfilter_unref_bufferp(&movie->picref); return ret; } |