[MPlayer-dev-eng] [PATCH] replacement for internal mpg123 fork (mp3lib)

Diego Biurrun diego at biurrun.de
Wed May 12 14:03:12 CEST 2010


On Wed, May 12, 2010 at 01:27:39PM +0200, Thomas Orgis wrote:
> The next iteration, fixing stream input handling for large frames (I
> got one bit wrong in the transition to the old-style API). CBR 320
> works for me now.

You've extensively commented your code.  Converting those comments to
Doxygen syntax would be even better.

> --- libmpcodecs/ad_mpg123.c	(Revision 0)
> +++ libmpcodecs/ad_mpg123.c	(Revision 0)
> @@ -0,0 +1,442 @@
> +
> +#ifdef CONFIG_FAKE_MONO
> +    /* Guessing here: Default value triggers forced upmix of mono to stereo. */
> +    flag = fakemono == 0 ? MPG123_FORCE_STEREO :
> +           fakemono == 1 ? MPG123_MONO_LEFT :
> +           fakemono == 2 ? MPG123_MONO_RIGHT : 0;

Thanks, I think this is a good example of how formatting can make code
much more readable; extra good karma for aligning the ':'.

> +        /* If we are here, we passed all hurdles. Yay! Extract the info. */
> +        print_header_compact(&finfo);
> +        /* Do we want to print out the UTF-8 Id3v2 info?
> +           if(v2)
> +                print_id3v2(v2); */

if (v2) and indentation is off.

> --- configure	(Revision 31163)
> +++ configure	(Arbeitskopie)
> @@ -6791,6 +6795,29 @@
>  
> +echocheck "mpg123 support"
> +def_mpg123='#undef CONFIG_MPG123'
> +if test "$_mpg123" = auto; then
> +  _mpg123=no
> +  cat > $TMPC <<EOF
> +#include <mpg123.h>
> +int main(void)
> +{
> +  mpg123_init();
> +  return 0;
> +}

int main(void) { mpg123_init(); return 0; }

Diego



More information about the MPlayer-dev-eng mailing list