The 0 case was added with the support for multiple packets. It
appears unintended and causes extra complexity and out of array
accesses (though within padding)
No testcase
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f64be9da4c8b16071ec84056a61d1fc0d5d6728c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -416,7 +416,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, |
416 | 416 |
return ret; |
417 | 417 |
out_frame = (int16_t*) frame->data[0]; |
418 | 418 |
|
419 |
- if (buf_size % 10 == 0) { |
|
419 |
+ if (buf_size && buf_size % 10 == 0) { |
|
420 | 420 |
packet_type = FORMAT_G729_8K; |
421 | 421 |
format = &format_g729_8k; |
422 | 422 |
//Reset voice decision |