summaryrefslogtreecommitdiff
path: root/net/opal3/files/patch-plugins-audio-celt-celtcodec.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2011-04-12 10:36:16 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2011-04-12 10:36:16 +0000
commitafb5d0b5f2a5db65f0a157dbd8622019ede8a001 (patch)
tree1b011bf7378ed0cc0d17c243ba56df1cc281df84 /net/opal3/files/patch-plugins-audio-celt-celtcodec.c
parent- update to 0.11.3 (diff)
- chase celt library bump
Notes
Notes: svn path=/head/; revision=272602
Diffstat (limited to 'net/opal3/files/patch-plugins-audio-celt-celtcodec.c')
-rw-r--r--net/opal3/files/patch-plugins-audio-celt-celtcodec.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/net/opal3/files/patch-plugins-audio-celt-celtcodec.c b/net/opal3/files/patch-plugins-audio-celt-celtcodec.c
index 9094b5b10118..823bca9cfb3c 100644
--- a/net/opal3/files/patch-plugins-audio-celt-celtcodec.c
+++ b/net/opal3/files/patch-plugins-audio-celt-celtcodec.c
@@ -1,6 +1,6 @@
---- plugins/audio/celt/celtcodec.c.orig 2009-09-22 02:57:45.000000000 +0200
-+++ plugins/audio/celt/celtcodec.c 2009-11-13 22:00:39.000000000 +0100
-@@ -52,7 +52,7 @@ static int init_mode(CELTContext *celt,
+--- ./plugins/audio/celt/celtcodec.c.orig 2009-09-22 02:57:45.000000000 +0200
++++ ./plugins/audio/celt/celtcodec.c 2011-04-12 12:26:00.485668577 +0200
+@@ -52,12 +52,12 @@
{
int error = 0;
@@ -9,7 +9,13 @@
if (celt->mode == NULL) {
return FALSE;
}
-@@ -74,7 +74,7 @@ static void * celt_create_encoder(const
+
+- celt_mode_info(celt->mode, CELT_GET_FRAME_SIZE, &celt->frame_size);
++ celt->frame_size = 960; /* default from tools/celtenc.c */
+ celt->bytes_per_packet = (codec->bitsPerSec * celt->frame_size/codec->sampleRate + 4) / 8;
+
+ return TRUE;
+@@ -74,7 +74,7 @@
return NULL;
}
@@ -18,7 +24,7 @@
if (celt->encoder_state == NULL ) {
celt_mode_destroy(celt->mode);
free(celt);
-@@ -96,7 +96,7 @@ static void * celt_create_decoder(const
+@@ -96,7 +96,7 @@
return NULL;
}
@@ -27,15 +33,24 @@
if (celt->decoder_state == NULL ) {
celt_mode_destroy(celt->mode);
free(celt);
-@@ -143,9 +143,9 @@ static int celt_codec_encoder(const stru
+@@ -143,9 +143,9 @@
return FALSE;
#ifdef HAVE_CELT_0_5_0_OR_LATER
- byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
-+ byteCount = celt_encode(celt->encoder_state, (celt_int16 *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
++ byteCount = celt_encode(celt->encoder_state, (celt_int16 *)fromPtr, celt->frame_size, (char *)toPtr, celt->bytes_per_packet);
#else
- byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, (char *)toPtr, celt->bytes_per_packet);
+ byteCount = celt_encode(celt->encoder_state, (celt_int16 *)fromPtr, (char *)toPtr, celt->bytes_per_packet);
#endif
if (byteCount < 0) {
return 0;
+@@ -173,7 +173,7 @@
+ if (*fromLen == 0)
+ return FALSE;
+
+- if (celt_decode(celt->decoder_state, (char *)fromPtr, *fromLen, (short *)toPtr) < 0) {
++ if (celt_decode(celt->decoder_state, (char *)fromPtr, *fromLen, (short *)toPtr, celt->frame_size) < 0) {
+ return 0;
+ }
+