mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-04 22:48:54 +00:00
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
This commit is contained in:
parent
46f979a839
commit
a3ad6eaf2d
2 changed files with 7 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue