mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 13:36:53 +02:00
Silenced compiler warnings.
This commit is contained in:
parent
61ff96556e
commit
167da08ab3
39
femonac3.c
39
femonac3.c
@ -37,6 +37,10 @@ cFemonAC3::~cFemonAC3()
|
||||
|
||||
bool cFemonAC3::processAudio(const uint8_t *buf, int len)
|
||||
{
|
||||
int fscod, frmsizcod, bsmod, acmod;
|
||||
int centermixlevel = AUDIO_CENTER_MIX_LEVEL_INVALID;
|
||||
int surroundmixlevel = AUDIO_SURROUND_MIX_LEVEL_INVALID;
|
||||
int dolbysurroundmode = AUDIO_DOLBY_SURROUND_MODE_INVALID;
|
||||
cBitStream bs(buf, len * 8);
|
||||
|
||||
if (!m_AudioHandler)
|
||||
@ -55,25 +59,32 @@ bool cFemonAC3::processAudio(const uint8_t *buf, int len)
|
||||
|
||||
bs.skipBits(16); // CRC1
|
||||
|
||||
uint8_t fscod = bs.getBits(2); // sampling rate values
|
||||
uint8_t frmsizcod = bs.getBits(6);// frame size code
|
||||
fscod = bs.getBits(2); // sampling rate values
|
||||
frmsizcod = bs.getBits(6); // frame size code
|
||||
|
||||
bs.skipBits(5); // bitstream id
|
||||
bsmod = bs.getBits(3); // bitstream mode
|
||||
acmod = bs.getBits(3); // audio coding mode
|
||||
|
||||
// 3 front channels
|
||||
if ((acmod & 0x01) && (acmod != 0x01))
|
||||
centermixlevel = bs.getBits(2);
|
||||
|
||||
// if a surround channel exists
|
||||
if (acmod & 0x04)
|
||||
surroundmixlevel = bs.getBits(2);
|
||||
|
||||
// if in 2/0 mode
|
||||
if (acmod == 0x02)
|
||||
dolbysurroundmode = bs.getBits(2);
|
||||
|
||||
m_AudioHandler->SetAC3Bitrate(1000 * s_Bitrates[frmsizcod >> 1]);
|
||||
m_AudioHandler->SetAC3SamplingFrequency(100 * s_Frequencies[fscod]);
|
||||
|
||||
bs.skipBits(5); // bitstream id
|
||||
int bsmod = bs.getBits(3); // bitstream mode
|
||||
int acmod = bs.getBits(3); // audio coding mode
|
||||
|
||||
m_AudioHandler->SetAC3Bitstream(bsmod);
|
||||
m_AudioHandler->SetAC3AudioCoding(acmod);
|
||||
|
||||
// 3 front channels
|
||||
m_AudioHandler->SetAC3CenterMix(((acmod & 0x01) && (acmod != 0x01)) ? bs.getBits(2) : AUDIO_CENTER_MIX_LEVEL_INVALID);
|
||||
// if a surround channel exists
|
||||
m_AudioHandler->SetAC3SurroundMix((acmod & 0x04) ? bs.getBits(2) : AUDIO_SURROUND_MIX_LEVEL_INVALID);
|
||||
// if in 2/0 mode
|
||||
m_AudioHandler->SetAC3DolbySurround((acmod == 0x02) ? bs.getBits(2) : AUDIO_DOLBY_SURROUND_MODE_INVALID);
|
||||
m_AudioHandler->SetAC3CenterMix(centermixlevel);
|
||||
m_AudioHandler->SetAC3SurroundMix(surroundmixlevel);
|
||||
m_AudioHandler->SetAC3DolbySurround(dolbysurroundmode);
|
||||
|
||||
m_AudioHandler->SetAC3LFE(bs.getBit()); // low frequency effects on
|
||||
m_AudioHandler->SetAC3Dialog(bs.getBits(5)); // dialog normalization
|
||||
|
@ -95,7 +95,7 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len)
|
||||
case NAL_SPS:
|
||||
if (!sps_found) {
|
||||
//Dprintf("H.264: Found NAL SPS at offset %d/%d", buf - start, len);
|
||||
int nal_len = nalUnescape(nal_data, buf + 4, end - buf - 4);
|
||||
int nal_len = nalUnescape(nal_data, buf + 4, int(end - buf - 4));
|
||||
consumed = parseSPS(nal_data, nal_len);
|
||||
if (consumed > 0)
|
||||
sps_found = true;
|
||||
@ -105,7 +105,7 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len)
|
||||
case NAL_SEI:
|
||||
if (!sei_found) {
|
||||
//Dprintf("H.264: Found NAL SEI at offset %d/%d", buf - start, len);
|
||||
int nal_len = nalUnescape(nal_data, buf + 4, end - buf - 4);
|
||||
int nal_len = nalUnescape(nal_data, buf + 4, int(end - buf - 4));
|
||||
consumed = parseSEI(nal_data, nal_len);
|
||||
if (consumed > 0)
|
||||
sei_found = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user