mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +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/4171>
This commit is contained in:
parent
83364c5729
commit
83985ae1fa
1 changed files with 5 additions and 1 deletions
|
@ -2042,8 +2042,12 @@ gst_ffmpegviddec_drain (GstVideoDecoder * decoder)
|
||||||
if (!ffmpegdec->opened)
|
if (!ffmpegdec->opened)
|
||||||
return GST_FLOW_OK;
|
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;
|
goto send_packet_failed;
|
||||||
|
}
|
||||||
|
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
got_frame = gst_ffmpegviddec_frame (ffmpegdec, NULL, &ret);
|
got_frame = gst_ffmpegviddec_frame (ffmpegdec, NULL, &ret);
|
||||||
|
|
Loading…
Reference in a new issue