mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
avviddec: Drop decoder stream lock when calling send_packet
This is already done for every other calls to send_packet. The deadlock occures since FFMPeg 6.0. The decoder tries to get a buffer from a thread during the draining process, and blocks trying to get the video decoder stream lock already heald by the drain function. Fixes #2383 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4187>
This commit is contained in:
parent
a81498c9de
commit
07ba258ead
1 changed files with 5 additions and 1 deletions
|
@ -2042,8 +2042,12 @@ gst_ffmpegviddec_drain (GstVideoDecoder * decoder)
|
|||
if (!ffmpegdec->opened)
|
||||
return GST_FLOW_OK;
|
||||
|
||||
if (avcodec_send_packet (ffmpegdec->context, NULL))
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec);
|
||||
if (avcodec_send_packet (ffmpegdec->context, NULL)) {
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
||||
goto send_packet_failed;
|
||||
}
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
||||
|
||||
do {
|
||||
got_frame = gst_ffmpegviddec_frame (ffmpegdec, NULL, &ret);
|
||||
|
|
Loading…
Reference in a new issue