diff options
author | iive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-07-19 09:55:29 +0000 |
---|---|---|
committer | iive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-07-19 09:55:29 +0000 |
commit | f6c25fd5c50bf1048f7c280312f6b920fe822edf (patch) | |
tree | 57c70160c11143d86d819f88ee88e34c74189e5b /libaf/reorder_ch.c | |
parent | e2ae312a37f5dffe7ac66346299eaaea9e2a3386 (diff) | |
download | mpv-f6c25fd5c50bf1048f7c280312f6b920fe822edf.tar.bz2 mpv-f6c25fd5c50bf1048f7c280312f6b920fe822edf.tar.xz |
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
Diffstat (limited to 'libaf/reorder_ch.c')
-rw-r--r-- | libaf/reorder_ch.c | 6 |
1 files changed, 6 insertions, 0 deletions
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: { |