[FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Mar 8 19:35:42 CET 2015


On 08.03.2015, at 19:15, Rainer Hochecker <fernetmenta at online.de> wrote:
> Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
> 
> I tried this patch with Kodi but did not get very far.
> 
> int ff_thread_can_start_frame(AVCodecContext *avctx)
> {
>    PerThreadContext *p = avctx->internal->thread_ctx;
>    if (avctx->active_thread_type&FF_THREAD_FRAME)
>        return 0;
>    av_assert0(!p->main_thread);
> 
> It hit this assert and call stack showed avformat_find_stream_info

This was the buggy first version, please see patch from march 2nd.
I have another fix locally that also fixes potential hangs with corrupted streams in addition, but the newer version should work.


More information about the ffmpeg-devel mailing list