From f6c25fd5c50bf1048f7c280312f6b920fe822edf Mon Sep 17 00:00:00 2001 From: iive Date: Sun, 19 Jul 2009 09:55:29 +0000 Subject: 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29427 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/reorder_ch.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libaf') diff --git a/libaf/reorder_ch.c b/libaf/reorder_ch.c index 1ef05f4838..fa0c2373bb 100644 --- a/libaf/reorder_ch.c +++ b/libaf/reorder_ch.c @@ -453,6 +453,7 @@ static int reorder_self_3(void *src, unsigned int samples, 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 *src, unsigned int samples, 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 *src, unsigned int samples, 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, unsigned int samples, 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, unsigned int samples, 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, unsigned int samples, src_8[i+s5*3+1] = tmp1; src_8[i+s5*3+2] = tmp2; } + break; } case 4: { -- cgit v1.2.3