mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
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
This commit is contained in:
parent
c4fb6c94e2
commit
6b3e3544d4
1 changed files with 8 additions and 0 deletions
|
@ -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))) {
|
||||
|
|
Loading…
Reference in a new issue