diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2012-10-18 22:18:28 +0200 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2012-10-18 22:18:28 +0200 |
commit | 5c0e0dd598d6a050a4c47bfb0ea1f2b55cc6feae (patch) | |
tree | 096c25f1761f37711026004a91d736c277b87b12 /gst/dvdsub | |
parent | c7272913d127bd221be1dc8c81fe43d15bccacd7 (diff) |
dvdsubparse: send src caps when receiving sink caps
Diffstat (limited to 'gst/dvdsub')
-rw-r--r-- | gst/dvdsub/gstdvdsubparse.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gst/dvdsub/gstdvdsubparse.c b/gst/dvdsub/gstdvdsubparse.c index 44e2aa1a..7bd22647 100644 --- a/gst/dvdsub/gstdvdsubparse.c +++ b/gst/dvdsub/gstdvdsubparse.c @@ -131,15 +131,25 @@ gst_dvd_sub_parse_event (GstPad * pad, GstObject * parent, GstEvent * event) parse = GST_DVD_SUB_PARSE (parent); - switch GST_EVENT_TYPE - (event) { + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CAPS: + { + GstCaps *caps; + + gst_event_unref (event); + caps = gst_static_pad_template_get_caps (&src_template); + gst_pad_push_event (parse->srcpad, gst_event_new_caps (caps)); + gst_caps_unref (caps); + ret = TRUE; + break; + } case GST_EVENT_FLUSH_STOP: gst_dvd_sub_parse_reset (parse); /* fall-through */ default: ret = gst_pad_event_default (pad, parent, event); break; - } + } return ret; } |