Commit b67c1ab5 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde Committed by Marton Balint

ffplay: more robust condition variable creation

SDL_CreateCond can fail:
https://wiki.libsdl.org/SDL_CreateCond.
This patch makes creation more robust in one instance.
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 4802b836
......@@ -3168,7 +3168,10 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat)
packet_queue_init(&is->subtitleq) < 0)
goto fail;
is->continue_read_thread = SDL_CreateCond();
if (!(is->continue_read_thread = SDL_CreateCond())) {
av_log(NULL, AV_LOG_FATAL, "SDL_CreateCond(): %s\n", SDL_GetError());
goto fail;
}
init_clock(&is->vidclk, &is->videoq.serial);
init_clock(&is->audclk, &is->audioq.serial);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment