[FFmpeg-cvslog] mlp: fix channel order.

Michael Niedermayer git at videolan.org
Wed Jan 23 19:41:19 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 23 19:26:22 2013 +0100| [6747b0be9b2a8e20724c6e514b3c8374c32fd6f0] | committer: Michael Niedermayer

mlp: fix channel order.

This fixes a regression introduced with todays merge

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6747b0be9b2a8e20724c6e514b3c8374c32fd6f0
---

 libavcodec/mlp_parser.c |    2 ++
 libavcodec/mlp_parser.h |    1 +
 libavcodec/mlpdec.c     |    2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 1831f64..2cc4b91 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -157,6 +157,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
 
         skip_bits(gb, 11);
 
+        mh->channel_arrangement=
         channel_arrangement    = get_bits(gb, 5);
         mh->channels_mlp       = mlp_channels[channel_arrangement];
         mh->channel_layout_mlp = ff_mlp_layout[channel_arrangement];
@@ -170,6 +171,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
 
         skip_bits(gb, 8);
 
+        mh->channel_arrangement=
         channel_arrangement            = get_bits(gb, 5);
         mh->channels_thd_stream1       = truehd_channels(channel_arrangement);
         mh->channel_layout_thd_stream1 = ff_truehd_layout(channel_arrangement);
diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
index f9638bb..9967abb 100644
--- a/libavcodec/mlp_parser.h
+++ b/libavcodec/mlp_parser.h
@@ -39,6 +39,7 @@ typedef struct MLPHeaderInfo
     int group1_samplerate;                  ///< Sample rate of first substream
     int group2_samplerate;                  ///< Sample rate of second substream (MLP only)
 
+    int channel_arrangement;
     int channels_mlp;                       ///< Channel count for MLP streams
     int channels_thd_stream1;               ///< Channel count for substream 1 of TrueHD streams ("6-channel presentation")
     int channels_thd_stream2;               ///< Channel count for substream 2 of TrueHD streams ("8-channel presentation")
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 4532b37..ebd0b48 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -386,7 +386,7 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
         }
     }
 
-    m->needs_reordering = mh.channels_mlp >= 18 && mh.channels_mlp <= 20;
+    m->needs_reordering = mh.channel_arrangement >= 18 && mh.channel_arrangement <= 20;
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list