]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add plc to bv16/32
authorBrian West <brian@freeswitch.org>
Fri, 13 Nov 2009 23:31:35 +0000 (23:31 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 13 Nov 2009 23:31:35 +0000 (23:31 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15466 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_bv16/mod_bv16.c
src/mod/codecs/mod_bv32/mod_bv32.c

index 37359ab75edcf0d1c56d8ebfe1ce9a7c51a0eaee..9cd0d7af94d29a99a03c640e02e8975262a2e192 100644 (file)
@@ -120,8 +120,12 @@ static switch_status_t switch_bv16_decode(switch_codec_t *codec,
 
        *decoded_data_len = 0;
        for (i = 0; i < frames; i++) {
-               BV16_BitUnPack(cur_frame, &context->dbs);
-               BV16_Decode(&context->dbs, &context->ds, target);
+               if ((*flag & SFF_PLC)) {
+                       BV16_PLC(&context->ds, target);
+               } else {
+                       BV16_BitUnPack(cur_frame, &context->dbs);
+                       BV16_Decode(&context->dbs, &context->ds, target);
+               }
                cur_frame += CODE_SIZE;
                target += FRAME_SIZE;
                *decoded_data_len += FRAME_SIZE * 2;
index 2ec2bc2356c6b01a60b2906212501948e9d9f63b..5093e4032a7f6eab84a60fdc43d3fbe37db38b31 100644 (file)
@@ -120,8 +120,12 @@ static switch_status_t switch_bv32_decode(switch_codec_t *codec,
 
        *decoded_data_len = 0;
        for (i = 0; i < frames; i++) {
-               BV32_BitUnPack(cur_frame, &context->dbs);
-               BV32_Decode(&context->dbs, &context->ds, target);
+               if ((*flag & SFF_PLC)) {
+                       BV32_PLC(&context->ds, target);
+               } else {
+                       BV32_BitUnPack(cur_frame, &context->dbs);
+                       BV32_Decode(&context->dbs, &context->ds, target);
+               }
                cur_frame += CODE_SIZE;
                target += FRAME_SIZE;
                *decoded_data_len += FRAME_SIZE * 2;