[FFmpeg-cvslog] mlpdec: supress layout mismatch warnings for 2 ch upmixed mono

Michael Niedermayer git at videolan.org
Tue Sep 25 23:00:32 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 25 22:45:52 2012 +0200| [c5e2347373453c61790e413a0fe0f1e6b4d65882] | committer: Michael Niedermayer

mlpdec: supress layout mismatch warnings for 2 ch upmixed mono

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

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

 libavcodec/mlpdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 141096b..ccd09b6 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -340,6 +340,8 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
         if (m->avctx->channels<=2 && m->avctx->channel_layout == AV_CH_LAYOUT_MONO && m->max_decoded_substream == 1) {
             av_log(m->avctx, AV_LOG_DEBUG, "Mono stream with 2 substreams, ignoring 2nd\n");
             m->max_decoded_substream = 0;
+            if (m->avctx->channels==2)
+                m->avctx->channel_layout = AV_CH_LAYOUT_STEREO;
         }
         if (m->avctx->channels &&
             !m->avctx->request_channels && !m->avctx->request_channel_layout &&



More information about the ffmpeg-cvslog mailing list