summaryrefslogtreecommitdiff
path: root/avplay.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-15 10:12:51 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-22 09:14:05 +0200
commit02ac7311c8f1f252398b57b54992756c95f77962 (patch)
tree790402cd02d9c4572b05efeb73bf474aadd3f359 /avplay.c
parent043800a96888f1a04732f12316ba477d8f098d3f (diff)
downloadffmpeg-02ac7311c8f1f252398b57b54992756c95f77962.tar.gz
lavfi: use avfilter_unref_bufferp() where appropriate.
Diffstat (limited to 'avplay.c')
-rw-r--r--avplay.c12
1 files changed, 3 insertions, 9 deletions
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