From e482b5b8e664326f967d355289094761dffd724d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 28 May 2013 13:23:40 +0200 Subject: [PATCH] playbin: In autoplug-queries, add the actual decoder/parser/etc template caps Add the actual decoder/parser/etc caps at the very end to make sure we don't cause empty caps to be returned, e.g. if a parser asks us but a decoder is required after it because no sink can handle the format directly. --- gst/playback/gstplaybin2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 283061762a..352b5afc3c 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -4250,7 +4250,12 @@ done: if (!result) return FALSE; - if (0) { + /* Add the actual decoder/parser/etc caps at the very end to + * make sure we don't cause empty caps to be returned, e.g. + * if a parser asks us but a decoder is required after it + * because no sink can handle the format directly. + */ + { GstPad *target = gst_ghost_pad_get_target (GST_GHOST_PAD (pad)); if (target) {