ref: d1c8338f9ba3c7ad0f5ff7b331837b96f62473c3
parent: ae4f2427e78904f57323f3618f110e2a8b36a602
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon Feb 8 11:49:23 EST 2021
iso: aac: use object type from audio specific config
--- a/iso.c
+++ b/iso.c
@@ -17,6 +17,7 @@
struct Audio {
u32int format;
+ int objtype;
int channels;
int bps;
int samplerate;
@@ -775,7 +776,7 @@
}
frame[0] = 0xff; /* syncword */
frame[1] = 0xf1; /* syncword, mpeg4, no crc */
- frame[2] = 1<<6 | i<<2 | t->audio.channels>>2; /* AAC(LC)??? FIXME, frequency index, channels */
+ frame[2] = (t->audio.objtype-1)<<6 | i<<2 | t->audio.channels>>2; /* object type, frequency index, channels */
}else{
werrstr("audio: unknown format %T\n", t->audio.format);
return -1;
@@ -1047,7 +1048,8 @@
n -= 2;
if(o == 0x40){ /* AAC */
- if((x >> 11) == 0x1f){
+ e->audio.objtype = x >> 11;
+ if(e->audio.objtype == 0x1f){
werrstr("extended object type not supported");
return -1;
}