OSDN Git Service

avplay: update get_buffer to be inline with avconv
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 16 Apr 2012 06:08:45 +0000 (23:08 -0700)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 16 Apr 2012 22:12:03 +0000 (15:12 -0700)
The buffer must have its dimension, pixel format and aspect ratio
set.

avplay.c

index a11f952..e9388fd 100644 (file)
--- 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;