Re: [PATCH 2/4] libmpdemux/mf: Refactor into one function per pattern type
Reimar Döffinger <[email protected]> Sun, 26 Sep 2021 20:10:56 +0200
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <[email protected]> |
> On 22 Sep 2021, at 21:54, Alexander Strasser <[email protected]> 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