Skip to content
Snippets Groups Projects
Commit ad8db30e authored by Thomas Guillem's avatar Thomas Guillem Committed by Steve Lhomme
Browse files

aout: fix possible data-race

Initialize main_stream before start since it can be read once the stream
is started from an event.

Refs #27023
parent d652f402
No related branches found
No related tags found
1 merge request!2018clock: fix audio/video synchronisation issues
......@@ -758,9 +758,10 @@ int aout_OutputNew(audio_output_t *aout, vlc_aout_stream *stream,
for (size_t i = 0; formats[i] != 0 && ret != VLC_SUCCESS; ++i)
{
filter_fmt->i_format = fmt->i_format = formats[i];
owner->main_stream = stream;
ret = aout->start(aout, fmt);
if (ret == 0)
owner->main_stream = stream;
if (ret != 0)
owner->main_stream = NULL;
}
vlc_mutex_unlock(&owner->lock);
if (ret)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment