mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 13:36:53 +02:00
Modified LATM parser.
This commit is contained in:
parent
f37f428670
commit
23a8a72c38
@ -45,8 +45,10 @@ bool cFemonLATM::processAudio(const uint8_t *buf, int len)
|
||||
if (bs.getBits(12) != 0x56E) // syncword
|
||||
return false;
|
||||
|
||||
if (bs.getBit() == 1) // id: MPEG-1=1, extension to lower sampling frequences=0
|
||||
return false;
|
||||
m_AudioHandler->SetAudioCodec(AUDIO_CODEC_LATM);
|
||||
|
||||
if (bs.getBit() == 0) // id: MPEG-1=1, extension to lower sampling frequencies=0
|
||||
return true; // @todo: lower sampling frequencies support
|
||||
int layer = 3 - bs.getBits(2); // layer: I=11, II=10, III=01
|
||||
bs.skipBit(); // protection bit
|
||||
int bit_rate_index = bs.getBits(4); // bitrate index
|
||||
@ -55,8 +57,6 @@ bool cFemonLATM::processAudio(const uint8_t *buf, int len)
|
||||
bs.skipBit(); // private pid
|
||||
int mode = bs.getBits(2); // mode
|
||||
|
||||
m_AudioHandler->SetAudioCodec(AUDIO_CODEC_LATM);
|
||||
|
||||
switch (mode) {
|
||||
case 0:
|
||||
m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_STEREO);
|
||||
|
Loading…
Reference in New Issue
Block a user