[FFmpeg-devel] [PATCH] hevc: fix deadlock for frame threading safe callbacks disabled

Rainer Hochecker fernetmenta at online.de
Sun Mar 8 17:17:01 CET 2015


Rainer Hochecker <fernetmenta <at> online.de> writes:

> 
> ---
>  libavcodec/hevc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
> index fdbaa28..7c7f920 100644
> --- a/libavcodec/hevc.c
> +++ b/libavcodec/hevc.c
>  <at>  <at>  -307,7 +307,7  <at>  <at>  static int set_sps(HEVCContext *s,
const HEVCSPS *sps)
>      *fmt++ = sps->pix_fmt;
>      *fmt = AV_PIX_FMT_NONE;
> 
> -    ret = ff_thread_get_format(s->avctx, pix_fmts);
> +    ret = ff_get_format(s->avctx, pix_fmts);
>      if (ret < 0)
>          goto fail;
>      s->avctx->pix_fmt = ret;


this is called from the main thread, hence a requesting the main thread do
the call to get_format results in a hang waiting for the state to be changed
to STATE_SETTING_UP



More information about the ffmpeg-devel mailing list