diff options
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 |