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/vf_yadif.c | |
parent | 043800a96888f1a04732f12316ba477d8f098d3f (diff) |
lavfi: use avfilter_unref_bufferp() where appropriate.
Diffstat (limited to 'libavfilter/vf_yadif.c')
-rw-r--r-- | libavfilter/vf_yadif.c | 9 |
1 files changed, 4 insertions, 5 deletions
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) |