mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
audio: fix segfault caused by incorrect number of planes
Use `mp_aframe_get_planes` to properly get the number of planes, instead of assuming it to be the number of channels. Fixes #6092
This commit is contained in:
parent
8b563a0346
commit
a127912345
@ -399,7 +399,7 @@ static bool reorder_planes(struct mp_aframe *mpa, int *reorder,
|
||||
if (!mp_aframe_set_chmap(mpa, newmap))
|
||||
return false;
|
||||
|
||||
int num_planes = newmap->num;
|
||||
int num_planes = mp_aframe_get_planes(mpa);
|
||||
uint8_t **planes = mp_aframe_get_data_rw(mpa);
|
||||
uint8_t *old_planes[MP_NUM_CHANNELS];
|
||||
assert(num_planes <= MP_NUM_CHANNELS);
|
||||
|
Loading…
Reference in New Issue
Block a user