playbin: only add the template caps when the result is empty
authorMatthew Waters <matthew@centricular.com>
Sun, 29 Nov 2015 23:28:55 +0000 (10:28 +1100)
committerMatthew Waters <matthew@centricular.com>
Fri, 18 Dec 2015 10:55:00 +0000 (21:55 +1100)
commit023af2d3b192f8ebf1bd4fe75a22a4adaedc1e05
treed4823226111160f6f64bd52a7243d357396d2795
parentaadefefba88afe4acbe64454650f24e7ce7c8d70
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
gst/playback/gstplaybin2.c