Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-05 03:38:06 +0300
committerMarton Balint <cus@passwd.hu>2015-10-05 23:25:51 +0300
commitb67c1ab58cb1a9933d01ad91c2c58d019e215c3d (patch)
tree039ca9ccaf6ee29ba9be88aaab5c4dc12772e78f /ffplay.c
parent4802b8368a707669b2dc0a4cdbebb27d4a519b36 (diff)
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: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 8c9f6b1f9d..cf0640ee9e 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -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);