[FFmpeg-devel] [PATCH] ffplay: log SDL error message

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sun Oct 4 18:34:59 CEST 2015


On Sun, Oct 4, 2015 at 12:33 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> This patch logs the SDL error message on failure of SDL_CreateMutex.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  ffplay.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ffplay.c b/ffplay.c
> index ad8ffd5..c00af91 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -3734,8 +3734,10 @@ static int lockmgr(void **mtx, enum AVLockOp op)
>     switch(op) {
>        case AV_LOCK_CREATE:
>            *mtx = SDL_CreateMutex();
> -          if(!*mtx)
> +          if(!*mtx) {
> +              av_log(NULL, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n", SDL_GetError());
>                return 1;
> +          }
>            return 0;
>        case AV_LOCK_OBTAIN:
>            return !!SDL_LockMutex(*mtx);
> --
> 2.6.0
>

I can squash these all into a single patch if that is preferred.


More information about the ffmpeg-devel mailing list