aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-28 01:19:28 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-28 01:19:28 +0100
commit56b84b023d705a2716a5a52948584874c8db7b05 (patch)
tree6454605aa92d2977dc339cf9c9e86200d0de69a9
parent0e216ed40789e382eb6725d1cd0941927bfd1400 (diff)
parentca78ee73db9e059f501706ba6108e23902e84933 (diff)
downloadffmpeg-56b84b023d705a2716a5a52948584874c8db7b05.tar.gz
Merge commit 'ca78ee73db9e059f501706ba6108e23902e84933' into release/2.4
* commit 'ca78ee73db9e059f501706ba6108e23902e84933': opusdec: make sure all substreams have the same number of coded samples Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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);
}