mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avcodec/g729dec: require buf_size to be non 0
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>
This commit is contained in:
parent
4d932eb66b
commit
0b49c74fe1
@ -416,7 +416,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
|
|||||||
return ret;
|
return ret;
|
||||||
out_frame = (int16_t*) frame->data[0];
|
out_frame = (int16_t*) frame->data[0];
|
||||||
|
|
||||||
if (buf_size % 10 == 0) {
|
if (buf_size && buf_size % 10 == 0) {
|
||||||
packet_type = FORMAT_G729_8K;
|
packet_type = FORMAT_G729_8K;
|
||||||
format = &format_g729_8k;
|
format = &format_g729_8k;
|
||||||
//Reset voice decision
|
//Reset voice decision
|
||||||
|
Loading…
x
Reference in New Issue
Block a user