mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
textrender: Negotiate caps on a GAP event if none were negotiated yet
Otherwise downstream wouldn't have received a segment event either and wouldn't know what to do with the gap event And also forward any pending segment event. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3541>
This commit is contained in:
parent
02359dd251
commit
010ede30dd
1 changed files with 19 additions and 0 deletions
|
@ -650,6 +650,25 @@ gst_text_render_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_GAP:
|
||||
/* Negotiate caps first if we negotiated none so far as otherwise
|
||||
* downstream wouldn't have received a segment event either and
|
||||
* wouldn't know what to do with the gap event */
|
||||
if (!gst_pad_has_current_caps (render->srcpad)) {
|
||||
if (gst_text_render_renegotiate (render) != GST_FLOW_OK) {
|
||||
gst_event_unref (event);
|
||||
ret = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (render->segment_event) {
|
||||
gst_pad_push_event (render->srcpad, render->segment_event);
|
||||
render->segment_event = NULL;
|
||||
}
|
||||
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
default:
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue