alphadecodebin: Fix stall due to QoS

alphacombine element is a simple element that assumes buffers are always
paired, or at least that missing buffers are signalled with a GAP. The QoS
implementation in the GstVideoDecoder base class allow decoders dropping
frames independently and that could lead to stall in alphacombine.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2326>
This commit is contained in:
Nicolas Dufresne 2021-06-14 16:04:52 -04:00
parent a71ec17cf0
commit 4ac9f91921
2 changed files with 10 additions and 0 deletions

View file

@ -138,6 +138,11 @@ gst_alpha_decode_bin_constructed (GObject * obj)
goto cleanup;
}
/* We disable QoS on decoders because we need to maintain frame pairing in
* order for alphacombine to work. */
g_object_set (decoder, "qos", FALSE, NULL);
g_object_set (alpha_decoder, "qos", FALSE, NULL);
alphacombine = gst_element_factory_make ("alphacombine", NULL);
if (!alphacombine) {
priv->missing_element = "alphacombine";

View file

@ -141,6 +141,11 @@ gst_v4l2_codec_alpha_decode_bin_constructed (GObject * obj)
goto cleanup;
}
/* We disable QoS on decoders because we need to maintain frame pairing in
* order for alphacombine to work. */
g_object_set (decoder, "qos", FALSE, NULL);
g_object_set (alpha_decoder, "qos", FALSE, NULL);
alphacombine = gst_element_factory_make ("alphacombine", NULL);
if (!alphacombine) {
priv->missing_element = "alphacombine";