[MPlayer-dev-eng] [PATCH] Support ffmpeg per-codec avoptions

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Apr 21 19:40:55 CEST 2011


On Wed, Apr 20, 2011 at 03:47:54PM -0700, Philip Langdale wrote:
> Currently, mplayer does not expose ffmpeg per-codec
> avoptions, which is unfortunate, but not terribly hard
> to fix.
> 
> This extends the existing "-lavdopts o=foo" mechanism
> to compare foo with the per-codec options.

If it works that should be ok.

> @@ -344,7 +345,9 @@ static int init(sh_video_t *sh){
>      avctx->skip_frame = str2AVDiscard(lavc_param_skip_frame_str);
>  
>      if(lavc_avopt){
> -        if(parse_avopts(avctx, lavc_avopt) < 0){
> +        if (parse_avopts(avctx, lavc_avopt) < 0 &&
> +            (!lavc_codec->priv_class || !avctx->priv_data ||
> +              parse_avopts(avctx->priv_data, lavc_avopt) < 0)) {

Wouldn't it be possible and nicer to change parse_avopts so you don't
need thw two extra NULL checks? I have no idea, I was just thinking.


More information about the MPlayer-dev-eng mailing list