aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/opusdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-28 00:00:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-28 00:14:13 +0100
commitfae545ca2a34973e60e9c918bfefe2b2dd7cffb8 (patch)
treedb0144561c823adc63a5b9958d8694bcf9219ebf /libavcodec/opusdec.c
parent449bd3c0c33c2ea52ae232d149d0207d53f34a88 (diff)
parent1973079417e8701b52ba810a72cb6c7c6f7f9a56 (diff)
downloadffmpeg-fae545ca2a34973e60e9c918bfefe2b2dd7cffb8.tar.gz
Merge commit '1973079417e8701b52ba810a72cb6c7c6f7f9a56'
* commit '1973079417e8701b52ba810a72cb6c7c6f7f9a56': opusdec: make sure all substreams have the same number of coded samples Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/opusdec.c')
-rw-r--r--libavcodec/opusdec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index b28edfbcd9..3ce519d1dc 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -499,6 +499,12 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "Error parsing the packet header.\n");
return ret;
}
+ if (coded_samples != s->packet.frame_count * s->packet.frame_duration) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Mismatching coded sample count in substream %d.\n", i);
+ return AVERROR_INVALIDDATA;
+ }
+
s->silk_samplerate = get_silk_samplerate(s->packet.config);
}