diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-21 07:52:14 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-21 07:52:14 +0100 |
commit | a3f491d43692e999270db5bac17717e8dfa60612 (patch) | |
tree | 731b7b33cfbae9f3241bb4f90087724f4d7c88ac /etisnoop/faad_decoder.cpp | |
parent | fa2d3b6517e3fdc72d8db57ac7ef930754fceb0d (diff) | |
download | mmbtools-aux-a3f491d43692e999270db5bac17717e8dfa60612.tar.gz mmbtools-aux-a3f491d43692e999270db5bac17717e8dfa60612.tar.bz2 mmbtools-aux-a3f491d43692e999270db5bac17717e8dfa60612.zip |
fix segfault, dump dabp
Diffstat (limited to 'etisnoop/faad_decoder.cpp')
-rw-r--r-- | etisnoop/faad_decoder.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etisnoop/faad_decoder.cpp b/etisnoop/faad_decoder.cpp index 21b12fa..17024ca 100644 --- a/etisnoop/faad_decoder.cpp +++ b/etisnoop/faad_decoder.cpp @@ -37,9 +37,10 @@ using namespace std; FaadDecoder::FaadDecoder() : m_data_len(0), + m_fd(NULL), + m_aac(NULL), m_initialised(false) { - m_aac = NULL; } void FaadDecoder::open(string filename, bool ps_flag, bool aac_channel_mode, @@ -137,7 +138,7 @@ bool FaadDecoder::decode(vector<vector<uint8_t> > aus) memcpy(helpBuffer, d_header, 7 * sizeof(uint8_t)); memcpy(&helpBuffer[7], - &au[0], vh.aac_frame_length * sizeof (uint8_t)); + &au[0], au.size() * sizeof (uint8_t)); fwrite(helpBuffer, 1, vh.aac_frame_length, m_aac); @@ -178,11 +179,13 @@ bool FaadDecoder::decode(vector<vector<uint8_t> > aus) m_channels = hInfo.channels; size_t samples = hInfo.samples; +#if 0 printf("bytes consumed %d\n", (int)(hInfo.bytesconsumed)); printf("samplerate = %d, samples = %zu, channels = %d," " error = %d, sbr = %d\n", m_sample_rate, samples, m_channels, hInfo.error, hInfo.sbr); printf("header = %d\n", hInfo.header_type); +#endif if (hInfo.error != 0) { printf("FAAD Warning: %s\n", |