summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/libffmpegFLAC/decoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/libffmpegFLAC/decoder.c b/apps/codecs/libffmpegFLAC/decoder.c
index 88fcbfd0bd..1d46eda353 100644
--- a/apps/codecs/libffmpegFLAC/decoder.c
+++ b/apps/codecs/libffmpegFLAC/decoder.c
@@ -144,7 +144,7 @@ static int decode_residuals(FLACContext *s, int32_t* decoded, int pred_order)
144 int sample = 0, samples; 144 int sample = 0, samples;
145 145
146 method_type = get_bits(&s->gb, 2); 146 method_type = get_bits(&s->gb, 2);
147 if (method_type != 0){ 147 if (method_type > 1){
148 //fprintf(stderr,"illegal residual coding method %d\n", method_type); 148 //fprintf(stderr,"illegal residual coding method %d\n", method_type);
149 return -3; 149 return -3;
150 } 150 }
@@ -157,8 +157,8 @@ static int decode_residuals(FLACContext *s, int32_t* decoded, int pred_order)
157 i= pred_order; 157 i= pred_order;
158 for (partition = 0; partition < (1 << rice_order); partition++) 158 for (partition = 0; partition < (1 << rice_order); partition++)
159 { 159 {
160 tmp = get_bits(&s->gb, 4); 160 tmp = get_bits(&s->gb, method_type == 0 ? 4 : 5);
161 if (tmp == 15) 161 if (tmp == (method_type == 0 ? 15 : 31))
162 { 162 {
163 //fprintf(stderr,"fixed len partition\n"); 163 //fprintf(stderr,"fixed len partition\n");
164 tmp = get_bits(&s->gb, 5); 164 tmp = get_bits(&s->gb, 5);