# HG changeset patch # User michael # Date 1023630733 0 # Node ID e97686ab386b4a95ed865358b65d944d705ff7d0 # Parent 66dd95953ec24027e76e70fd831ccc28c69a505d grayscale only decoding support diff -r 66dd95953ec2 -r e97686ab386b libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Sun Jun 09 13:45:49 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sun Jun 09 13:52:13 2002 +0000 @@ -55,12 +55,16 @@ static int lavc_param_workaround_bugs=0; static int lavc_param_error_resilience=0; +static int lavc_param_gray=0; struct config lavc_decode_opts_conf[]={ #if LIBAVCODEC_BUILD >= 4611 {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, {"ver", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL}, #endif +#if LIBAVCODEC_BUILD >= 4614 + {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL}, +#endif {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -114,6 +118,9 @@ avctx->workaround_bugs= lavc_param_workaround_bugs; avctx->error_resilience= lavc_param_error_resilience; #endif +#if LIBAVCODEC_BUILD >= 4614 + if(lavc_param_gray) avctx->flags|= CODEC_FLAG_GRAY; +#endif mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height); if (sh->format == mmioFOURCC('R', 'V', '1', '3'))