[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.62,1.63

Michael Niedermayer michael at mplayerhq.hu
Sun Oct 27 02:38:10 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv28310

Modified Files:
	vd_ffmpeg.c 
Log Message:
handle direct rendering buffer allocation failure


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- vd_ffmpeg.c	24 Oct 2002 19:40:08 -0000	1.62
+++ vd_ffmpeg.c	27 Oct 2002 00:37:51 -0000	1.63
@@ -54,7 +54,11 @@
 
 #include "cfgparser.h"
 
+#if LIBAVCODEC_BUILD >= 4632
+static int get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type);
+#else
 static void get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type);
+#endif
 
 #ifdef FF_BUG_AUTODETECT
 static int lavc_param_workaround_bugs= FF_BUG_AUTODETECT;
@@ -231,7 +235,9 @@
     }
     if (sh->bih && (sh->bih->biSize != sizeof(BITMAPINFOHEADER)) &&
 	(sh->format == mmioFOURCC('M','4','S','2') ||
-	 sh->format == mmioFOURCC('M','P','4','S')))
+	 sh->format == mmioFOURCC('M','P','4','S') ||
+	 sh->format == mmioFOURCC('W','M','V','2')
+         ))
     {
 	avctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER);
 	avctx->extradata = malloc(avctx->extradata_size);
@@ -373,7 +379,11 @@
 }
 
 #if LIBAVCODEC_BUILD > 4615
+#if LIBAVCODEC_BUILD >= 4632
+static int get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type){
+#else
 static void get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type){
+#endif
     sh_video_t * sh = avctx->opaque;
     vd_ffmpeg_ctx *ctx = sh->context;
     mp_image_t* mpi=NULL;
@@ -455,6 +465,9 @@
     printf("S");
 else
     printf(".");
+#endif
+#if LIBAVCODEC_BUILD >= 4632
+    return 0;
 #endif
 }
 #endif




More information about the MPlayer-cvslog mailing list