Mercurial > mplayer.hg
changeset 7928:5d1c1d73e8f3
handle direct rendering buffer allocation failure
author | michael |
---|---|
date | Sun, 27 Oct 2002 00:37:51 +0000 |
parents | b1767137b278 |
children | 48075855804b |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Sat Oct 26 16:25:32 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sun Oct 27 00:37:51 2002 +0000 @@ -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; @@ -456,6 +466,9 @@ else printf("."); #endif +#if LIBAVCODEC_BUILD >= 4632 + return 0; +#endif } #endif