aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec/src/tpdec_asc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libMpegTPDec/src/tpdec_asc.cpp')
-rw-r--r--libMpegTPDec/src/tpdec_asc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp
index b0f1c6a..8d411e8 100644
--- a/libMpegTPDec/src/tpdec_asc.cpp
+++ b/libMpegTPDec/src/tpdec_asc.cpp
@@ -2102,7 +2102,9 @@ TRANSPORTDEC_ERROR AudioSpecificConfig_Parse(
self->m_aot = getAOT(bs);
self->m_samplingFrequency =
getSampleRate(bs, &self->m_samplingFrequencyIndex, 4);
- if (self->m_samplingFrequency <= 0) {
+ if (self->m_samplingFrequency <= 0 ||
+ (self->m_samplingFrequency > 96000 && self->m_aot != 39) ||
+ self->m_samplingFrequency > 4 * 96000) {
return TRANSPORTDEC_PARSE_ERROR;
}