[FFmpeg-cvslog] r18072 - in trunk/libavcodec: mlp.h mlpdec.c

ramiro subversion
Fri Mar 20 14:02:16 CET 2009


Author: ramiro
Date: Fri Mar 20 14:02:15 2009
New Revision: 18072

Log:
truehd: support up to 3 substreams.

Modified:
   trunk/libavcodec/mlp.h
   trunk/libavcodec/mlpdec.c

Modified: trunk/libavcodec/mlp.h
==============================================================================
--- trunk/libavcodec/mlp.h	Fri Mar 20 13:04:58 2009	(r18071)
+++ trunk/libavcodec/mlp.h	Fri Mar 20 14:02:15 2009	(r18072)
@@ -34,10 +34,10 @@
  */
 #define MAX_MATRICES        15
 
-/** Maximum number of substreams that can be decoded. This could also be set
- *  higher, but I haven't seen any examples with more than two.
+/** Maximum number of substreams that can be decoded.
+ *  MLP's limit is 2. TrueHD supports at least up to 3.
  */
-#define MAX_SUBSTREAMS      2
+#define MAX_SUBSTREAMS      3
 
 /** maximum sample frequency seen in files */
 #define MAX_SAMPLERATE      192000

Modified: trunk/libavcodec/mlpdec.c
==============================================================================
--- trunk/libavcodec/mlpdec.c	Fri Mar 20 13:04:58 2009	(r18071)
+++ trunk/libavcodec/mlpdec.c	Fri Mar 20 14:02:15 2009	(r18072)
@@ -280,6 +280,10 @@ static int read_major_sync(MLPDecodeCont
 
     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 "




More information about the ffmpeg-cvslog mailing list