[MPlayer-dev-eng] [PATCH 2/4] libmpdemux/mf: Refactor into one function per pattern type

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Sep 26 21:10:56 EEST 2021



> On 22 Sep 2021, at 21:54, Alexander Strasser <eclipse7 at gmx.net> wrote:
>
> - /* only try one more init method depending on filename */
> - if( !init_success && strchr( filename,',') )
> + if( !init_success )
> +  {
> +   if( strchr( filename,',') )
>     {
>      init_success = init_mf_from_comma_delimited_paths(mf, filename);
>     }
> - else if ( !init_success && !strchr( filename,'%' ) )
> +   else if ( !strchr( filename,'%' ) )
>     {
>      init_success = init_mf_from_glob_pattern(mf, filename);
>     }
> - else if ( !init_success )
> +   else
>     {
>      init_success = init_mf_from_printf_format(mf, filename);
>     }
> +  }

Possibly minor simplification/consistency change:
Flip the last 2 cases to remove the negation for the second strchr



More information about the MPlayer-dev-eng mailing list