From: Matthew Waters Date: Sun, 29 Nov 2015 23:28:55 +0000 (+1100) Subject: playbin: only add the template caps when the result is empty X-Git-Tag: 1.19.3~511^2~3150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=023af2d3b192f8ebf1bd4fe75a22a4adaedc1e05;p=platform%2Fupstream%2Fgstreamer.git playbin: only add the template caps when the result is empty Unconditionally adding the template caps when proxying the caps query will play havoc with decoders that attempt to choose an output format based on some caps features. Creating a sink that does not include those caps features and a decoder/parser/etc that preferentially chooses some specific caps feature when available, will always return the decoder/parser/etc template caps and choose a feature that downstream will be unable to support. Fix by limiting the addition of the template caps to when the result is actually empty. https://bugzilla.gnome.org/show_bug.cgi?id=758212 --- diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 4a056a0e11..acdcf6cb35 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -4987,7 +4987,7 @@ done: * if a parser asks us but a decoder is required after it * because no sink can handle the format directly. */ - { + if (gst_caps_is_empty (result)) { GstPad *target = gst_ghost_pad_get_target (GST_GHOST_PAD (pad)); if (target) {