ref: f451c32474504a0329b572f436f8eacd904fba9c
parent: 8fa91fb864f0b74d5e1510b278e974a9f2653344
author: menno <menno>
date: Mon Mar 19 15:53:46 EST 2001
Correct encoding of files other than 2 channel now
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: main.c,v 1.11 2001/03/12 20:12:37 menno Exp $
+ * $Id: main.c,v 1.12 2001/03/19 20:53:37 menno Exp $
*/
#ifdef _WIN32
@@ -120,9 +120,9 @@
switch(argv[i][1]) {
case 'p': case 'P':
if ((argv[i][2] == 'l') || (argv[i][2] == 'L'))
- myFormat->aacProfile = MAIN;
- else if ((argv[i][2] == 'm') || (argv[i][2] == 'M'))
myFormat->aacProfile = LOW;
+ else if ((argv[i][2] == 'm') || (argv[i][2] == 'M'))
+ myFormat->aacProfile = MAIN;
break;
case 't': case 'T':
if ((argv[i][2] == 'n') || (argv[i][2] == 'N'))
--- a/libfaac/bitstream.c
+++ b/libfaac/bitstream.c
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: bitstream.c,v 1.7 2001/03/17 09:22:54 menno Exp $
+ * $Id: bitstream.c,v 1.8 2001/03/19 20:53:46 menno Exp $
*/
#include <stdlib.h>
@@ -186,11 +186,10 @@
PutBit(bitStream, hEncoder->config.aacProfile, 2); /* profile */
PutBit(bitStream, hEncoder->sampleRateIdx, 4); /* sampling rate */
PutBit(bitStream, 0, 1); /* private bit */
-#ifdef MPEG2AAC
- PutBit(bitStream, 2, 3); /* ch. config (must be > 0) */
-#else
- PutBit(bitStream, 1, 3); /* ch. config (must be > 0) */
-#endif
+ PutBit(bitStream, hEncoder->numChannels, 3); /* ch. config (must be > 0) */
+ /* simply using numChannels only works for
+ 6 channels or less, else a channel
+ configuration should be written */
PutBit(bitStream, 0, 1); /* original/copy */
PutBit(bitStream, 0, 1); /* home */
#ifndef MPEG2AAC