summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-04-14 23:22:40 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-04-15 00:54:00 +0100
commita3ad6eaf2d8285e9af588a7a9d99d0e1de9daf94 (patch)
tree31a5d94d188936e81f7696971eb8fc9a264e97b8
parent46f979a83957b76c64b5caabfa7d5cd424eedf7d (diff)
kate: fix decoder output caps
It's either pango-markup or utf8, never both at the same time. https://bugzilla.gnome.org/show_bug.cgi?id=697071
-rw-r--r--ext/kate/gstkatedec.c7
-rw-r--r--ext/kate/gstkateutil.c5
2 files changed, 7 insertions, 5 deletions
diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c
index 98790b202..1d20ce6d5 100644
--- a/ext/kate/gstkatedec.c
+++ b/ext/kate/gstkatedec.c
@@ -114,7 +114,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("text/x-raw, format={ pango-markup, utf8 }; "
+ GST_STATIC_CAPS ("text/x-raw, format = { pango-markup, utf8 }; "
GST_KATE_SPU_MIME_TYPE)
);
@@ -295,10 +295,11 @@ gst_kate_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
if (G_LIKELY (buffer)) {
GstCaps *caps;
if (plain) {
- caps = gst_caps_new_empty_simple ("text/x-raw");
+ caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING,
+ "utf8", NULL);
} else {
caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING,
- "pango-markup, utf8", NULL);
+ "pango-markup", NULL);
}
gst_pad_push_event (kd->srcpad, gst_event_new_caps (caps));
gst_caps_unref (caps);
diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c
index d6c45d8d8..b30ee5952 100644
--- a/ext/kate/gstkateutil.c
+++ b/ext/kate/gstkateutil.c
@@ -306,10 +306,11 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
strcmp (decoder->k.ki->category, "spu-subtitles") == 0) {
*src_caps = gst_caps_new_empty_simple ("subpicture/x-dvd");
} else if (decoder->k.ki->text_markup_type == kate_markup_none) {
- *src_caps = gst_caps_new_empty_simple ("text/x-raw");
+ *src_caps = gst_caps_new_simple ("text/x-raw", "format",
+ G_TYPE_STRING, "utf8", NULL);
} else {
*src_caps = gst_caps_new_simple ("text/x-raw", "format",
- G_TYPE_STRING, "pango-markup, utf8", NULL);
+ G_TYPE_STRING, "pango-markup", NULL);
}
GST_INFO_OBJECT (srcpad, "Setting caps: %" GST_PTR_FORMAT, *src_caps);
if (!gst_pad_set_caps (srcpad, *src_caps)) {