You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
ffplay: more robust mutex creation
SDL_CreateMutex can fail: https://wiki.libsdl.org/SDL_CreateMutex. 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>
This commit is contained in:
committed by
Marton Balint
parent
80b6cc4214
commit
7c6dd90eed
6
ffplay.c
6
ffplay.c
@@ -2817,6 +2817,12 @@ static int read_thread(void *arg)
|
|||||||
int scan_all_pmts_set = 0;
|
int scan_all_pmts_set = 0;
|
||||||
int64_t pkt_ts;
|
int64_t pkt_ts;
|
||||||
|
|
||||||
|
if (!wait_mutex) {
|
||||||
|
av_log(NULL, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n", SDL_GetError());
|
||||||
|
ret = AVERROR(ENOMEM);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
memset(st_index, -1, sizeof(st_index));
|
memset(st_index, -1, sizeof(st_index));
|
||||||
is->last_video_stream = is->video_stream = -1;
|
is->last_video_stream = is->video_stream = -1;
|
||||||
is->last_audio_stream = is->audio_stream = -1;
|
is->last_audio_stream = is->audio_stream = -1;
|
||||||
|
Reference in New Issue
Block a user