[MPlayer-cvslog] r29427 - trunk/libaf/reorder_ch.c

iive subversion at mplayerhq.hu
Sun Jul 19 11:55:30 CEST 2009


Author: iive
Date: Sun Jul 19 11:55:29 2009
New Revision: 29427

Log:
Fix 24bit audio playback.
The reordering channels code had reoccurring bug
where in switch(samplesize) block the
case 3 (3 bytes) doesn't end with break;
leading to execution of the next case 4 too.
This mangles the already processed data and
causes massive memory corruption.

Modified:
   trunk/libaf/reorder_ch.c

Modified: trunk/libaf/reorder_ch.c
==============================================================================
--- trunk/libaf/reorder_ch.c	Sat Jul 18 17:07:26 2009	(r29426)
+++ trunk/libaf/reorder_ch.c	Sun Jul 19 11:55:29 2009	(r29427)
@@ -453,6 +453,7 @@ static int reorder_self_3(void *src, uns
             src_8[i+s2*3+1] = tmp1;
             src_8[i+s2*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -547,6 +548,7 @@ static int reorder_self_4_step_1(void *s
             src_8[i+s3*3+1] = tmp1;
             src_8[i+s3*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -695,6 +697,7 @@ static int reorder_self_5_step_1(void *s
             src_8[i+s4*3+1] = tmp1;
             src_8[i+s4*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -787,6 +790,7 @@ static int reorder_self_2_3(void *src, u
             src_8[i+s4*3+1] = tmp1;
             src_8[i+s4*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -873,6 +877,7 @@ static int reorder_self_3_3(void *src, u
             src_8[i+s5*3+1] = tmp1;
             src_8[i+s5*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -959,6 +964,7 @@ static int reorder_self_2_4(void *src, u
             src_8[i+s5*3+1] = tmp1;
             src_8[i+s5*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {


More information about the MPlayer-cvslog mailing list