audio: fix uninitialized data access

dst was not supposed to be initialized, the mp_audio_ setters (which
initialize dst's fields) assume it is -> shit happens. Regression from
recent changes. Was probably harmless.
This commit is contained in:
wm4 2017-08-18 17:53:29 +02:00
parent 01058b16f9
commit 1f7fe1597d
1 changed files with 1 additions and 0 deletions

View File

@ -420,6 +420,7 @@ struct mp_audio *mp_audio_from_aframe(struct mp_aframe *aframe)
void mp_audio_config_from_aframe(struct mp_audio *dst, struct mp_aframe *src)
{
*dst = (struct mp_audio){0};
struct mp_chmap chmap = {0};
mp_aframe_get_chmap(src, &chmap);
mp_audio_set_channels(dst, &chmap);