fix g++ warnings

This commit is contained in:
Gilles Boccon-Gibod 2021-06-12 20:37:55 -07:00
parent bf0880c4e0
commit 11c1e69cdd
4 changed files with 25 additions and 24 deletions

View File

@ -854,7 +854,7 @@ AddAc4Track(AP4_Movie& movie,
unsigned int sample_description_index = 0;
// read from the input, feed, and get AC-4 frames
AP4_UI32 sample_rate = 0;
// AP4_UI32 sample_rate = 0;
AP4_Cardinal sample_count = 0;
AP4_Cardinal sample_duration = 0;
AP4_Cardinal media_time_scale = 0;
@ -886,7 +886,7 @@ AddAc4Track(AP4_Movie& movie,
ac4Dsi); // AC-4 DSI
sample_description_index = sample_table->GetSampleDescriptionCount();
sample_table->AddSampleDescription(sample_description);
sample_rate = frame.m_Info.m_Ac4Dsi.d.v1.fs;
/* sample_rate = */frame.m_Info.m_Ac4Dsi.d.v1.fs;
sample_duration = frame.m_Info.m_SampleDuration;
media_time_scale = frame.m_Info.m_MediaTimeScale;

View File

@ -72,9 +72,9 @@ AP4_Eac3Header::AP4_Eac3Header(const AP4_UI08* bytes)
}
/* unsigned char dialnorm = */ bits.ReadBits(5); // dialnorm
unsigned char compr;
// unsigned char compr;
if (bits.ReadBit()) { // compre
compr = bits.ReadBits(8);
/* compr = */ bits.ReadBits(8);
}
if (m_Acmod == 0x0){ // if 1+1 mode (dual mono, so some items need a second value)
@ -98,28 +98,28 @@ AP4_Eac3Header::AP4_Eac3Header(const AP4_UI08* bytes)
}
// Extract mixing metadata
unsigned char dmixmod, ltrtcmixlev, lorocmixlev, ltrtsurmixlev, lorosurmixlev, lfemixlevcod;
// unsigned char dmixmod, ltrtcmixlev, lorocmixlev, ltrtsurmixlev, lorosurmixlev, lfemixlevcod;
if (bits.ReadBit()){ // mixmdate
if (m_Acmod > 0x2) {
dmixmod = bits.ReadBits(2);
/* dmixmod = */ bits.ReadBits(2);
}
if ((m_Acmod & 0x1) && (m_Acmod > 0x2)) {
ltrtcmixlev = bits.ReadBits(3);
lorocmixlev = bits.ReadBits(3);
/* ltrtcmixlev = */ bits.ReadBits(3);
/* lorocmixlev = */ bits.ReadBits(3);
}
if (m_Acmod & 0x4) {
ltrtsurmixlev = bits.ReadBits(3);
lorosurmixlev = bits.ReadBits(3);
/* ltrtsurmixlev = */ bits.ReadBits(3);
/* lorosurmixlev = */ bits.ReadBits(3);
}
if (m_Lfeon) {
if (bits.ReadBit()) { // lfemixlevcode
lfemixlevcod = bits.ReadBits(5);
/* lfemixlevcod = */ bits.ReadBits(5);
}
}
if (m_Strmtyp == 0x0) { // if independent stream
unsigned char pgmscl, extpgmscl;
// unsigned char pgmscl, extpgmscl;
if (bits.ReadBit()) { // pgmscle
pgmscl = bits.ReadBits(6);
/* pgmscl = */ bits.ReadBits(6);
}
if (m_Acmod == 0x0){ // if 1+1 mode (dual mono, so some items need a second value)
@ -129,7 +129,7 @@ AP4_Eac3Header::AP4_Eac3Header(const AP4_UI08* bytes)
}
if(bits.ReadBit()) { // extpgmscle
extpgmscl = bits.ReadBits(6);
/* extpgmscl = */ bits.ReadBits(6);
}
char mixdef = bits.ReadBits(2);
@ -249,15 +249,15 @@ AP4_Eac3Header::AP4_Eac3Header(const AP4_UI08* bytes)
m_Infomdate = bits.ReadBit();
if (m_Infomdate){
m_Bsmod = bits.ReadBits(3);
unsigned char copyrightb, origbs, dsurexmod;
copyrightb = bits.ReadBits(1);
origbs = bits.ReadBits(1);
// unsigned char copyrightb, origbs, dsurexmod;
/* copyrightb = */ bits.ReadBits(1);
/* origbs = */ bits.ReadBits(1);
if (m_Acmod == 0x2) { // if in 2/0 mode
bits.SkipBits(4); // dsurmod, dheadphonmod
}
if (m_Acmod >= 0x6) { // if both surround channels exist
dsurexmod = bits.ReadBits(2);
/* dsurexmod = */ bits.ReadBits(2);
}
if(bits.ReadBit()){ // audprodie
bits.SkipBits(8); // mixlevel, roomtyp, adconvtyp

View File

@ -62,8 +62,9 @@ AP4_Dac3Atom::Create(AP4_Size size, AP4_ByteStream& stream)
AP4_Dac3Atom::AP4_Dac3Atom(const AP4_Dac3Atom& other):
AP4_Atom(AP4_ATOM_TYPE_DAC3, other.m_Size32),
m_DataRate(other.m_DataRate),
m_RawBytes(other.m_RawBytes),
m_StreamInfo(other.m_StreamInfo){
m_StreamInfo(other.m_StreamInfo),
m_RawBytes(other.m_RawBytes)
{
}
/*----------------------------------------------------------------------

View File

@ -62,10 +62,11 @@ AP4_Dec3Atom::Create(AP4_Size size, AP4_ByteStream& stream)
AP4_Dec3Atom::AP4_Dec3Atom(const AP4_Dec3Atom& other):
AP4_Atom(AP4_ATOM_TYPE_DEC3, other.m_Size32),
m_DataRate(other.m_DataRate),
m_RawBytes(other.m_RawBytes),
m_SubStreams(other.m_SubStreams),
m_FlagEC3ExtensionTypeA(other.m_FlagEC3ExtensionTypeA),
m_ComplexityIndexTypeA(other.m_ComplexityIndexTypeA){
m_ComplexityIndexTypeA(other.m_ComplexityIndexTypeA),
m_SubStreams(other.m_SubStreams),
m_RawBytes(other.m_RawBytes)
{
}
/*----------------------------------------------------------------------
@ -74,7 +75,6 @@ AP4_Dec3Atom::AP4_Dec3Atom(const AP4_Dec3Atom& other):
AP4_Dec3Atom::AP4_Dec3Atom():
AP4_Atom(AP4_ATOM_TYPE_DEC3, AP4_ATOM_HEADER_SIZE),
m_DataRate(0),
m_RawBytes(0),
m_FlagEC3ExtensionTypeA(0),
m_ComplexityIndexTypeA(0)
{