mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
dvdsubparse: send src caps when receiving sink caps
This commit is contained in:
parent
c7272913d1
commit
5c0e0dd598
1 changed files with 13 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue