aboutsummaryrefslogtreecommitdiffstats
path: root/lib/decoding/tch_f_decoder_impl.cc
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2018-02-27 08:34:03 +0100
committerPiotr Krysik <ptrkrysik@gmail.com>2018-02-27 14:45:14 +0100
commit792330777d7c21df02ce1ecb6f876b076a14b519 (patch)
tree66541ce1c9619f2e4e3f523ad5a9f4e7ce875682 /lib/decoding/tch_f_decoder_impl.cc
parent8bed612c39731e94b7061dc74227e1debee2a429 (diff)
Portability fix: replacing tables of variable size with memory allocations
Diffstat (limited to 'lib/decoding/tch_f_decoder_impl.cc')
-rw-r--r--lib/decoding/tch_f_decoder_impl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/decoding/tch_f_decoder_impl.cc b/lib/decoding/tch_f_decoder_impl.cc
index 1f22cf2..02dc45a 100644
--- a/lib/decoding/tch_f_decoder_impl.cc
+++ b/lib/decoding/tch_f_decoder_impl.cc
@@ -388,7 +388,7 @@ namespace gr {
if (good)
{
- unsigned char frameBuffer[mAMRFrameLth];
+ unsigned char * frameBuffer = new unsigned char [mAMRFrameLth];
// AMR Frame, consisting of a 8 bit frame header, plus the payload from decoding
BitVector amrFrame(mKd + 8);
BitVector payload = amrFrame.tail(8);
@@ -402,6 +402,7 @@ namespace gr {
mTCHD.copyTo(payload);
amrFrame.pack(frameBuffer);
message_port_pub(pmt::mp("voice"), pmt::cons(pmt::PMT_NIL, pmt::make_blob(frameBuffer,mAMRFrameLth)));
+ delete[] frameBuffer;
}
}
}