aboutsummaryrefslogtreecommitdiffstats
path: root/lib/decoding/tch_f_decoder_impl.cc
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2016-08-18 18:57:02 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2016-08-18 18:57:02 +0200
commit5c9afd38f066bc428bb50d5a0782bd7408f54be7 (patch)
tree93badee680688572e5eb1e877267881337f80c59 /lib/decoding/tch_f_decoder_impl.cc
parent601195bc1809a9c989737b40843ca7656a773bd9 (diff)
TCH/F decoding correction - less wrong messages interpreted as voice frames
Diffstat (limited to 'lib/decoding/tch_f_decoder_impl.cc')
-rw-r--r--lib/decoding/tch_f_decoder_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/decoding/tch_f_decoder_impl.cc b/lib/decoding/tch_f_decoder_impl.cc
index cc88c90..41e5f53 100644
--- a/lib/decoding/tch_f_decoder_impl.cc
+++ b/lib/decoding/tch_f_decoder_impl.cc
@@ -266,8 +266,8 @@ namespace gr {
// check parity of class 1A
unsigned sentParity = (~mTCHU.peekField(91, 3)) & 0x07;
unsigned calcParity = mClass1A_d.parity(mTCHParity) & 0x07;
-
- bool good = (sentParity == calcParity);
+ unsigned tail = mTCHU.peekField(185, 4);
+ bool good = (sentParity == calcParity) && (tail == 0);
if (good)
{