Commit e6d165e3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: missing lock in get_format()

Pointed-out-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 73d8e11f
......@@ -1122,6 +1122,8 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
if (!can_hwaccel)
return swfmt;
wait_mt(p_sys);
for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
{
enum PixelFormat hwfmt = pi_fmt[i];
......@@ -1147,6 +1149,8 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
continue;
}
post_mt(p_sys);
if (va->description != NULL)
msg_Info(p_dec, "Using %s for hardware decoding", va->description);
......@@ -1159,6 +1163,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
return pi_fmt[i];
}
post_mt(p_sys);
/* Fallback to default behaviour */
return swfmt;
}
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