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

Alexander Strasser eclipse7 at gmx.net
Thu Feb 24 19:26:28 EET 2022


On 2021-09-26 20:10 +0200, Reimar Döffinger wrote:
>
>
> > 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

Committed Patch 1 and 2 (including Reimar's suggested change) as
MPlayer SVN r38340 and r38341 respectively.


  Alexander


More information about the MPlayer-dev-eng mailing list