diff options
author | Edward Hervey <bilboed@bilboed.com> | 2010-10-24 16:09:26 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2010-10-24 16:19:09 +0200 |
commit | 65cfcffbc0883a360c95e705df358310700d6deb (patch) | |
tree | a8272681f418476c8f5efa63f9c9bca2f7e6a102 | |
parent | da9682a593723db926ab5e0c083bdc8f1c17e17f (diff) |
discoverer: Get pad caps if we can't get negotiated caps
Better provide something than nothing
https://bugzilla.gnome.org/show_bug.cgi?id=632988
-rw-r--r-- | gst-libs/gst/pbutils/gstdiscoverer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index 06ef5f47f..176800ede 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -508,14 +508,17 @@ collect_stream_information (GstDiscoverer * dc, PrivateStream * ps, guint idx) /* Get caps */ caps = gst_pad_get_negotiated_caps (ps->pad); + if (!caps) { + GST_WARNING ("Couldn't get negotiated caps from %s:%s", + GST_DEBUG_PAD_NAME (ps->pad)); + caps = gst_pad_get_caps (ps->pad); + } if (caps) { GST_DEBUG ("Got caps %" GST_PTR_FORMAT, caps); gst_structure_id_set (st, _CAPS_QUARK, GST_TYPE_CAPS, caps, NULL); gst_caps_unref (caps); - } else - GST_WARNING ("Couldn't get negotiated caps from %s:%s", - GST_DEBUG_PAD_NAME (ps->pad)); + } if (ps->tags) gst_structure_id_set (st, _TAGS_QUARK, GST_TYPE_STRUCTURE, ps->tags, NULL); |