[libav-devel] [PATCH 7/7] dcadec: treat all 2-channel modes as Stereo in dca_downmix.

Tim Walker tdskywalker at gmail.com
Fri Nov 22 23:07:32 CET 2013


The check for (prim_channels > 2) before calling dca_downmix made these cases unreachable, but now 2.1 layouts will go through the downmix code. Having dual mono, Lt/Rt and sum-difference layouts print errors when regular Stereo doesn't seems pointless.
---
 libavcodec/dcadec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index c59179f..fa1b976 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -1050,13 +1050,13 @@ static void dca_downmix(float **samples, int srcfmt, int lfe_present,
 
     switch (srcfmt) {
     case DCA_MONO:
-    case DCA_CHANNEL:
-    case DCA_STEREO_TOTAL:
-    case DCA_STEREO_SUMDIFF:
     case DCA_4F2R:
         av_log(NULL, 0, "Not implemented!\n");
         break;
+    case DCA_CHANNEL:
     case DCA_STEREO:
+    case DCA_STEREO_TOTAL:
+    case DCA_STEREO_SUMDIFF:
         break;
     case DCA_3F:
         c = channel_mapping[0];
-- 
1.8.3.4 (Apple Git-47)



More information about the libav-devel mailing list