[MPlayer-cvslog] r35023 - trunk/libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Sat Jul 14 13:37:22 CEST 2012


Author: reimar
Date: Sat Jul 14 13:37:22 2012
New Revision: 35023

Log:
Initialize a few more AVFrame fields to avoid FFmpeg errors.
However this really needs to be done via FFmpeg somehow to avoid
issues each time new fields are added, either by exposing
ff_init_buffer_info as public API or by calling get_buffer etc.
through wrappers that take care of the initialization.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Fri Jul 13 23:47:50 2012	(r35022)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sat Jul 14 13:37:22 2012	(r35023)
@@ -674,6 +674,10 @@ static int get_buffer(AVCodecContext *av
     pic->linesize[2]= mpi->stride[2];
     pic->linesize[3]= mpi->stride[3];
 
+    pic->width  = avctx->width;
+    pic->height = avctx->height;
+    pic->format = avctx->pix_fmt;
+
     pic->opaque = mpi;
 //printf("%X\n", (int)mpi->planes[0]);
 #if 0


More information about the MPlayer-cvslog mailing list