summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-27 00:37:51 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-27 00:37:51 +0000
commit31f511c9a67632ffff5228a885f1687e024fbee4 (patch)
treeb0d93dd60578d379ae611b4f42d41b3fdbf7369e /libmpcodecs
parent14a729831f31289658b6b2990e8134a3d6c63925 (diff)
downloadmpv-31f511c9a67632ffff5228a885f1687e024fbee4.tar.bz2
mpv-31f511c9a67632ffff5228a885f1687e024fbee4.tar.xz
handle direct rendering buffer allocation failure
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7929 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index d0075cac5d..8e9487b542 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -54,7 +54,11 @@ typedef struct {
#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 @@ static int init(sh_video_t *sh){
}
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 @@ static int init_vo(sh_video_t *sh){
}
#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;
@@ -456,6 +466,9 @@ else if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)
else
printf(".");
#endif
+#if LIBAVCODEC_BUILD >= 4632
+ return 0;
+#endif
}
#endif