summaryrefslogtreecommitdiff
path: root/libavcodec/mlpdec.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2009-03-20 13:02:15 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2009-03-20 13:02:15 +0000
commit932cee5d6730c1358cb564ee0c84423ddd9ab21c (patch)
tree9c4bd2b9b7b4f5fd345a2a32674db9bf04cac31d /libavcodec/mlpdec.c
parent952e2083bc3fd758f871b1141e1358f2c8252735 (diff)
truehd: support up to 3 substreams.
Originally committed as revision 18072 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r--libavcodec/mlpdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 6b825cdea1..c71450062a 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -280,6 +280,10 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
if (mh.num_substreams == 0)
return -1;
+ if (m->avctx->codec_id == CODEC_ID_MLP && mh.num_substreams > 2) {
+ av_log(m->avctx, AV_LOG_ERROR, "MLP only supports up to 2 substreams.\n");
+ return -1;
+ }
if (mh.num_substreams > MAX_SUBSTREAMS) {
av_log(m->avctx, AV_LOG_ERROR,
"Number of substreams %d is larger than the maximum supported "