appsrc: Wake up the create() function on caps changes
authorSebastian Dröge <sebastian@centricular.com>
Mon, 24 Aug 2020 16:37:15 +0000 (19:37 +0300)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 9 Sep 2020 06:45:49 +0000 (06:45 +0000)
This allows the new caps to be sent downstream as soon as possible
instead of having to wait for the next buffer/buffer list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/798>

gst-libs/gst/app/gstappsrc.c

index 2df2e73..0fc806b 100644 (file)
@@ -1457,6 +1457,9 @@ gst_app_src_set_caps (GstAppSrc * appsrc, const GstCaps * caps)
     }
     gst_queue_array_push_tail (priv->queue, new_caps);
     gst_caps_replace (&priv->last_caps, new_caps);
+
+    if ((priv->wait_status & STREAM_WAITING))
+      g_cond_broadcast (&priv->cond);
   }
 
   GST_OBJECT_UNLOCK (appsrc);