Eliminate redundant redundancy code.
The redundancy_bytes<0 test always fails because of the ec_tell(&dec)+29 test above.
This commit is contained in:
parent
9c93763121
commit
4cc9a459e8
1 changed files with 2 additions and 11 deletions
|
@ -322,17 +322,8 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
|
||||||
if (redundancy)
|
if (redundancy)
|
||||||
{
|
{
|
||||||
celt_to_silk = ec_dec_bit_logp(&dec, 1);
|
celt_to_silk = ec_dec_bit_logp(&dec, 1);
|
||||||
if (mode == MODE_HYBRID)
|
/*Due to the ec_tell check above redundancy_bytes will be at least two for hybrid*/
|
||||||
redundancy_bytes = 2 + ec_dec_uint(&dec, 256);
|
redundancy_bytes = mode==MODE_HYBRID ? ec_dec_uint(&dec, 256)+2 : len-((ec_tell(&dec)+7)>>3);
|
||||||
else {
|
|
||||||
redundancy_bytes = len - ((ec_tell(&dec)+7)>>3);
|
|
||||||
/* Can only happen on an invalid packet */
|
|
||||||
if (redundancy_bytes<0)
|
|
||||||
{
|
|
||||||
redundancy_bytes = 0;
|
|
||||||
redundancy = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
len -= redundancy_bytes;
|
len -= redundancy_bytes;
|
||||||
if (len<0)
|
if (len<0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue