diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2012-01-05 08:29:43 +0100 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2012-01-06 14:40:25 +0100 |
commit | 6b3e3544d41ce0bc42c3597b3eb2130719379917 (patch) | |
tree | 47298f6d10dcd98463b7cd04643508a29d2d1815 | |
parent | c4fb6c94e2b2687eacbb821b1d2c799beb1db28f (diff) |
decodebin2: Try harder to get initial topology caps
Since caps are no longer 'shared' between two pads (but forwarded from
source pad to sink pad) we end up with the first chain pad not having
specified caps (i.e. typefind:src).
This solves the issues by getting the pad's peer caps.
It is not optimal since it will (for most demuxers) return the pad
template caps, which might contain non-fixed caps (ex : with
qtdemux "video/quicktime; video/mj2; audio/x-m4a; application/x-3gp")
https://bugzilla.gnome.org/show_bug.cgi?id=667337
-rw-r--r-- | gst/playback/gstdecodebin2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index d266d7190..e3501abc5 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -3512,6 +3512,14 @@ gst_decode_chain_get_topology (GstDecodeChain * chain) /* Caps that resulted in this chain */ caps = gst_pad_get_current_caps (chain->pad); + + if (!caps) { + /* Try querying the peer sink pad caps. + * This will most likely be the case with typefind:src + */ + caps = gst_pad_peer_query_caps (chain->pad, NULL); + } + if (!caps) { caps = get_pad_caps (chain->pad); if (G_UNLIKELY (!gst_caps_is_fixed (caps))) { |