decodebin3: actually check result of accept caps query

We were just checking if the query was handled, not its result.

Also fix a leak as gst_pad_query() was not consuming the query.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
This commit is contained in:
Guillaume Desmottes 2016-07-13 14:17:25 +02:00 committed by Tim-Philipp Müller
parent 3273714e0a
commit 6c58f5ee2f

View file

@ -1740,8 +1740,8 @@ reconfigure_output_stream (DecodebinOutputStream * output,
gboolean can_reuse_decoder; gboolean can_reuse_decoder;
if (needs_decoder) { if (needs_decoder) {
GstQuery *q = gst_query_new_accept_caps (new_caps); can_reuse_decoder =
can_reuse_decoder = gst_pad_query (output->decoder_sink, q); gst_pad_query_accept_caps (output->decoder_sink, new_caps);
} else } else
can_reuse_decoder = FALSE; can_reuse_decoder = FALSE;