[MPlayer-dev-eng] [PATCH 2/2] libvo/vo_png: set AVFrame width/height/format

Michael Niedermayer michaelni at gmx.at
Wed Jul 15 16:56:29 CEST 2015


From: Michael Niedermayer <michael at niedermayer.cc>

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libvo/vo_png.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libvo/vo_png.c b/libvo/vo_png.c
index 109ff4f..38a4097 100644
--- a/libvo/vo_png.c
+++ b/libvo/vo_png.c
@@ -167,6 +167,9 @@ static uint32_t draw_image(mp_image_t* mpi){
     pic = av_frame_alloc();
     avctx->width = mpi->w;
     avctx->height = mpi->h;
+    pic->width  = mpi->w;
+    pic->height = mpi->h;
+    pic->format = imgfmt2pixfmt(png_format);
     pic->data[0] = mpi->planes[0];
     pic->linesize[0] = mpi->stride[0];
     buffersize = mpi->w * mpi->h * 8;
-- 
1.7.9.5



More information about the MPlayer-dev-eng mailing list