mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
avviddec: Unlock stream lock while waiting for decoded frame
FFmpeg might request buffer from other threads, it will result in deadlock Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2558 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5683>
This commit is contained in:
parent
e3f6818003
commit
f96d05bf52
1 changed files with 4 additions and 0 deletions
|
@ -1779,7 +1779,11 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
|
|||
* else we might skip a reference frame */
|
||||
gst_ffmpegviddec_do_qos (ffmpegdec, frame, &mode_switch);
|
||||
|
||||
/* FFmpeg might request new buffer from other threads.
|
||||
* Release lock here */
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec);
|
||||
res = avcodec_receive_frame (ffmpegdec->context, ffmpegdec->picture);
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
||||
|
||||
/* No frames available at this time */
|
||||
if (res == AVERROR (EAGAIN)) {
|
||||
|
|
Loading…
Reference in a new issue