]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
correct please test
authorBrian West <brian@freeswitch.org>
Wed, 5 Jan 2011 22:48:11 +0000 (16:48 -0600)
committerBrian West <brian@freeswitch.org>
Wed, 5 Jan 2011 22:48:11 +0000 (16:48 -0600)
src/mod/codecs/mod_celt/Makefile
src/mod/codecs/mod_celt/mod_celt.c

index cdcc045bdbcf305875750a31e3447b2cad3e46f9..2d2e27f04cca14b8f51460375dcb51d7a81cbaa3 100644 (file)
@@ -1,6 +1,6 @@
 BASE=../../../..
 
-CELT=celt-0.7.1
+CELT=celt-0.10.0
 
 CELT_DIR=$(switch_srcdir)/libs/$(CELT)
 CELT_BUILDDIR=$(switch_builddir)/libs/$(CELT)
index d65e095fbf12a1c8a513c4273df5154978d3979c..37983f3683981281d30e72e067f376657557d264 100644 (file)
@@ -54,7 +54,7 @@ static switch_status_t switch_celt_init(switch_codec_t *codec, switch_codec_flag
        }
 
        context->mode_object = celt_mode_create(codec->implementation->actual_samples_per_second, codec->implementation->samples_per_packet, NULL);
-       celt_mode_info(context->mode_object, CELT_GET_FRAME_SIZE, &context->frame_size);
+
        context->bytes_per_packet = (codec->implementation->bits_per_second * context->frame_size / codec->implementation->actual_samples_per_second + 4) / 8;
 
        /*
@@ -111,7 +111,7 @@ static switch_status_t switch_celt_encode(switch_codec_t *codec,
                return SWITCH_STATUS_FALSE;
        }
 
-       *encoded_data_len = (uint32_t) celt_encode(context->encoder_object, (void *) decoded_data, NULL,
+       *encoded_data_len = (uint32_t) celt_encode(context->encoder_object, (void *) decoded_data, codec->implementation->samples_per_packet,
                                                                                           (unsigned char *) encoded_data, context->bytes_per_packet);
 
        return SWITCH_STATUS_SUCCESS;
@@ -130,7 +130,7 @@ static switch_status_t switch_celt_decode(switch_codec_t *codec,
                return SWITCH_STATUS_FALSE;
        }
 
-       if (celt_decode(context->decoder_object, encoded_data, encoded_data_len, decoded_data)) {
+       if (celt_decode(context->decoder_object, encoded_data, encoded_data_len, decoded_data, codec->implementation->samples_per_packet)) {
                return SWITCH_STATUS_GENERR;
        }