From e79b308f82c39d9be7f86055659d16498c99b1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Brzezi=C5=84ski?= Date: Fri, 20 Oct 2023 13:50:16 +0200 Subject: [PATCH] vtdec: Fix deadlock when attempting to negotiate This was wrongly calling the base class method, which unnecessairly took the stream lock, already taken by handle_frame(). The drain() call in negotiate() would then wait for the output loop to pause, while that loop is stuck waiting to take the stream lock, thus causing a deadlock. Part-of: --- subprojects/gst-plugins-bad/sys/applemedia/vtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c b/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c index 770b294119..694e746160 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c +++ b/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c @@ -812,7 +812,7 @@ gst_vtdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) /* Negotiate now so that we know whether we need to use the GL upload meta or not. * gst_vtenc_negotiate() will drain before attempting to negotiate. */ if (gst_pad_check_reconfigure (decoder->srcpad)) { - if (!gst_video_decoder_negotiate (decoder)) { + if (!gst_vtdec_negotiate (decoder)) { gst_pad_mark_reconfigure (decoder->srcpad); if (GST_PAD_IS_FLUSHING (decoder->srcpad)) ret = GST_FLOW_FLUSHING;