Commit ac54ee04 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵 Committed by Tim-Philipp Müller

avviddec: Release stream lock while calling avcodec_decode_video2()

It might call back into us from another thread and try to take
the stream lock again, e.g. to allocate a buffer. Fixes avdec_h265
not outputting anything.
parent 07d18516
......@@ -1246,8 +1246,15 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
GST_DEBUG_OBJECT (ffmpegdec, "copy pal %p %p", &packet, pal);
/* This might call into get_buffer() from another thread,
* which would cause a deadlock. Release the lock here
* and taking it again later seems safe
* See
len = avcodec_decode_video2 (ffmpegdec->context,
ffmpegdec->picture, have_data, &packet);
GST_DEBUG_OBJECT (ffmpegdec, "after decode: len %d, have_data %d",
len, *have_data);
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