* commit 'ca78ee73db9e059f501706ba6108e23902e84933':
opusdec: make sure all substreams have the same number of coded samples
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -499,6 +499,12 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data, |
499 | 499 |
av_log(avctx, AV_LOG_ERROR, "Error parsing the packet header.\n"); |
500 | 500 |
return ret; |
501 | 501 |
} |
502 |
+ if (coded_samples != s->packet.frame_count * s->packet.frame_duration) { |
|
503 |
+ av_log(avctx, AV_LOG_ERROR, |
|
504 |
+ "Mismatching coded sample count in substream %d.\n", i); |
|
505 |
+ return AVERROR_INVALIDDATA; |
|
506 |
+ } |
|
507 |
+ |
|
502 | 508 |
s->silk_samplerate = get_silk_samplerate(s->packet.config); |
503 | 509 |
} |
504 | 510 |
|