mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
e2ae312a37
commit
f6c25fd5c5
|
@ -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:
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue