[FFmpeg-cvslog] avplay: update get_buffer to be inline with avconv

Luca Barbato git at videolan.org
Wed Apr 18 00:41:39 CEST 2012


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sun Apr 15 23:08:45 2012 -0700| [6943fb47d3bd0bd46734cdd762ab2c4ee89b0a22] | committer: Luca Barbato

avplay: update get_buffer to be inline with avconv

The buffer must have its dimension, pixel format and aspect ratio
set.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6943fb47d3bd0bd46734cdd762ab2c4ee89b0a22
---

 avplay.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/avplay.c b/avplay.c
index a11f952..e9388fd 100644
--- a/avplay.c
+++ b/avplay.c
@@ -1564,6 +1564,10 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
     pic->opaque = ref;
     pic->type   = FF_BUFFER_TYPE_USER;
     pic->reordered_opaque = codec->reordered_opaque;
+    pic->width               = codec->width;
+    pic->height              = codec->height;
+    pic->format              = codec->pix_fmt;
+    pic->sample_aspect_ratio = codec->sample_aspect_ratio;
     if (codec->pkt) pic->pkt_pts = codec->pkt->pts;
     else            pic->pkt_pts = AV_NOPTS_VALUE;
     return 0;



More information about the ffmpeg-cvslog mailing list