aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby Bingham <uhmmmm@gmail.com>2010-04-01 06:41:25 +0000
committerBobby Bingham <uhmmmm@gmail.com>2010-04-01 06:41:25 +0000
commitc41c5b02d3012ddc944cc8147bcc71f4e20ea0fa (patch)
tree1bbf0a6f78c8f2b1ad8b971e894735da52aeb70c
parentdd0c789be7c5607ed7d21e547246e8481b4211d1 (diff)
downloadffmpeg-c41c5b02d3012ddc944cc8147bcc71f4e20ea0fa.tar.gz
Don't create unnecessary refereces to pictures
Originally committed as revision 22755 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffplay.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ffplay.c b/ffplay.c
index a0d8a18f5b..a5c4403092 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1648,7 +1648,7 @@ static int input_request_frame(AVFilterLink *link)
return -1;
if(priv->use_dr1) {
- picref = priv->frame->opaque;
+ picref = avfilter_ref_pic(priv->frame->opaque, ~0);
} else {
picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h);
av_picture_copy((AVPicture *)&picref->data, (AVPicture *)priv->frame,
@@ -1659,11 +1659,9 @@ static int input_request_frame(AVFilterLink *link)
picref->pts = pts;
picref->pos = pkt.pos;
picref->pixel_aspect = priv->is->video_st->codec->sample_aspect_ratio;
- avfilter_start_frame(link, avfilter_ref_pic(picref, ~0));
+ avfilter_start_frame(link, picref);
avfilter_draw_slice(link, 0, link->h, 1);
avfilter_end_frame(link);
- if(!priv->use_dr1)
- avfilter_unref_pic(picref);
return 0;
}