From 02ac7311c8f1f252398b57b54992756c95f77962 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 15 Jul 2012 10:12:51 +0200 Subject: lavfi: use avfilter_unref_bufferp() where appropriate. --- avplay.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'avplay.c') diff --git a/avplay.c b/avplay.c index a42a0b48b6..ee069b58dd 100644 --- a/avplay.c +++ b/avplay.c @@ -1235,10 +1235,7 @@ static void stream_close(VideoState *is) for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { vp = &is->pictq[i]; #if CONFIG_AVFILTER - if (vp->picref) { - avfilter_unref_buffer(vp->picref); - vp->picref = NULL; - } + avfilter_unref_bufferp(&vp->picref); #endif if (vp->bmp) { SDL_FreeYUVOverlay(vp->bmp); @@ -1287,9 +1284,7 @@ static void alloc_picture(void *opaque) SDL_FreeYUVOverlay(vp->bmp); #if CONFIG_AVFILTER - if (vp->picref) - avfilter_unref_buffer(vp->picref); - vp->picref = NULL; + avfilter_unref_bufferp(&vp->picref); vp->width = is->out_video_filter->inputs[0]->w; vp->height = is->out_video_filter->inputs[0]->h; @@ -1382,8 +1377,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t if (vp->bmp) { AVPicture pict = { { 0 } }; #if CONFIG_AVFILTER - if (vp->picref) - avfilter_unref_buffer(vp->picref); + avfilter_unref_bufferp(&vp->picref); vp->picref = src_frame->opaque; #endif -- cgit v1.2.3