Skip to content
Snippets Groups Projects
Commit 90fc0913 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf
Browse files

decoder: fix race in spu_new_buffer


There is a race when starting video with subtitles at a given position (via
--start-time).

If all decoders are flushed early, the video decoder may not have created the
Vout via the decoder_NewPicture call. In that case, spu_new_buffer will be
blocking for 6 seconds. Indeed, spu_new_buffer can block for maximum 6 seconds
when it's waiting for a Vout.

To solve this race, abort spu_new_buffer if decoder is flushing.

How to reproduce the race condition:
./vlc --start-time 3600 <video_with_subtitles>

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b506e7db
No related branches found
No related tags found
No related merge requests found
Loading
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