diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-19 09:47:37 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-19 09:47:37 +0000 |
commit | 8a4e66f19bbbf3135b17a85a460d33a86227d951 (patch) | |
tree | 7ef6841f4ead3445c848df9400751e7fbb2d0d24 /libmpcodecs/vd_ffmpeg.c | |
parent | 4910023824cf712187e4a901f47f424bcdbf6e1c (diff) | |
download | mpv-8a4e66f19bbbf3135b17a85a460d33a86227d951.tar.bz2 mpv-8a4e66f19bbbf3135b17a85a460d33a86227d951.tar.xz |
use avcodec_alloc_context()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7445 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index ffdbc2dbd3..777a17689d 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -131,9 +131,13 @@ static int init(sh_video_t *sh){ if(lavc_codec->capabilities&CODEC_CAP_DR1) ctx->do_dr1=1; #endif - + +#if LIBAVCODEC_BUILD >= 4624 + ctx->avctx = avcodec_alloc_context(); +#else ctx->avctx = malloc(sizeof(AVCodecContext)); memset(ctx->avctx, 0, sizeof(AVCodecContext)); +#endif avctx = ctx->avctx; #if LIBAVCODEC_BUILD > 4615 |