# HG changeset patch # User michaelni # Date 1052139582 0 # Node ID 23f62139c0137d5a39e2e0b5f5e164f0e3cf7f04 # Parent 7500e14259a66a42f49666ea7d35829bdb2199d0 prefers MP3 codec (rather than MP2) for output if compiled with MP3LAME and output file seems to be of MP3 type patch by (Andriy Rysin ) with minor changes by me diff -r 7500e14259a6 -r 23f62139c013 raw.c --- a/raw.c Mon May 05 10:56:23 2003 +0000 +++ b/raw.c Mon May 05 12:59:42 2003 +0000 @@ -222,7 +222,11 @@ "mp2", "MPEG audio layer 2", "audio/x-mpeg", +#ifdef CONFIG_MP3LAME + "mp2", +#else "mp2,mp3", +#endif 0, CODEC_ID_MP2, 0, @@ -231,6 +235,20 @@ raw_write_trailer, }; +#ifdef CONFIG_MP3LAME +AVOutputFormat mp3_oformat = { + "mp3", + "MPEG audio layer 3", + "audio/x-mpeg", + "mp3", + 0, + CODEC_ID_MP3LAME, + 0, + raw_write_header, + raw_write_packet, + raw_write_trailer, +}; +#endif AVInputFormat ac3_iformat = { "ac3", @@ -525,7 +543,9 @@ { av_register_input_format(&mp3_iformat); av_register_output_format(&mp2_oformat); - +#ifdef CONFIG_MP3LAME + av_register_output_format(&mp3_oformat); +#endif av_register_input_format(&ac3_iformat); av_register_output_format(&ac3_oformat);