[FFmpeg-devel] [PATCHv2] ffplay: more robust mutex creation

Marton Balint cus at passwd.hu
Sun Oct 4 18:47:02 CEST 2015



On Sun, 4 Oct 2015, Ganesh Ajjanagadde wrote:

> 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 at gmail.com>
> ---
> ffplay.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/ffplay.c b/ffplay.c
> index c5a7895..84bd6ee 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -2817,6 +2817,12 @@ static int read_thread(void *arg)
>     int scan_all_pmts_set = 0;
>     int64_t pkt_ts;
> 
> +    if (!wait_mutex) {
> +        av_log(is, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n", SDL_GetError());

VideoState has no AVClass, are you sure this works? All other instances 
use NULL.

Regards,
Marton


More information about the ffmpeg-devel mailing list