From: Wim Taymans Date: Fri, 17 Feb 2012 13:37:36 +0000 (+0100) Subject: ssaparse: set caps on srcpad X-Git-Tag: 1.19.3~511^2~6772 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2946746ae4fa6f8ec2446607aef009b1f6254fd;p=platform%2Fupstream%2Fgstreamer.git ssaparse: set caps on srcpad --- diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index 55a5cd7..f77829f 100644 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c @@ -146,6 +146,7 @@ static gboolean gst_ssa_parse_setcaps (GstPad * sinkpad, GstCaps * caps) { GstSsaParse *parse = GST_SSA_PARSE (GST_PAD_PARENT (sinkpad)); + GstCaps *outcaps; const GValue *val; GstStructure *s; const guchar bom_utf8[] = { 0xEF, 0xBB, 0xBF }; @@ -153,6 +154,7 @@ gst_ssa_parse_setcaps (GstPad * sinkpad, GstCaps * caps) GstMapInfo map; gchar *ptr; gsize left; + gboolean ret; s = gst_caps_get_structure (caps, 0); val = gst_structure_get_value (s, "codec_data"); @@ -194,7 +196,11 @@ gst_ssa_parse_setcaps (GstPad * sinkpad, GstCaps * caps) gst_buffer_unmap (priv, &map); gst_buffer_unref (priv); - return TRUE; + outcaps = gst_caps_new_empty_simple ("text/x-pango-markup"); + ret = gst_pad_set_caps (parse->srcpad, outcaps); + gst_caps_unref (outcaps); + + return ret; /* ERRORS */ invalid_init: