uridecodebin3: make caps property work
authorTim-Philipp Müller <tim@centricular.com>
Mon, 15 Feb 2021 16:05:30 +0000 (16:05 +0000)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 16 Feb 2021 22:58:22 +0000 (22:58 +0000)
The caps set on uridecodebin3 via the "caps" property
were never passed to the internal decodebin3, so did
absolutely nothing.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/837

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

gst/playback/gsturidecodebin3.c

index 6d0d779..0f64565 100644 (file)
@@ -1106,6 +1106,9 @@ gst_uri_decode_bin3_change_state (GstElement * element,
   GstURIDecodeBin3 *uridecodebin = (GstURIDecodeBin3 *) element;
 
   switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      g_object_set (uridecodebin->decodebin, "caps", uridecodebin->caps, NULL);
+      break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       ret = activate_next_play_item (uridecodebin);
       if (ret == GST_STATE_CHANGE_FAILURE)