ref: 92c896e8806ec34c826e638512f7e33f1c9edcd0
parent: 1c80f649601a4f7250a84d27903b564c6594596c
author: Gregory Maxwell <[email protected]>
date: Mon Nov 28 18:19:08 EST 2011
Fixes the code for optional self-delimited packing to make it fit the draft This has no impact on opus_demo, test vectors, or "normal" codec operation
--- a/src/opus_multistream.c
+++ b/src/opus_multistream.c
@@ -108,7 +108,7 @@
i = (prev<0) ? 0 : prev+1;
for (;i<layout->nb_channels;i++)
{
- if (layout->mapping[i]==2*layout->nb_coupled_streams+stream_id)
+ if (layout->mapping[i]==stream_id+layout->nb_coupled_streams)
return i;
}
return -1;
--- a/src/repacketizer.c
+++ b/src/repacketizer.c
@@ -111,7 +111,7 @@
len = rp->len+begin;
frames = rp->frames+begin;
if (self_delimited)
- tot_size = 1 + len[count-1]>=252;
+ tot_size = 1 + (len[count-1]>=252);
else
tot_size = 0;
@@ -184,7 +184,6 @@
}
if (self_delimited) {
int sdlen = encode_size(len[count-1], data);
- tot_size += sdlen;
data += sdlen;
}
/* Copy the actual data */