mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +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/3548>
This commit is contained in:
parent
14f6dbc39a
commit
c44ed8af36
1 changed files with 19 additions and 0 deletions
|
@ -650,6 +650,25 @@ gst_text_render_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
|
|
||||||
break;
|
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:
|
default:
|
||||||
ret = gst_pad_event_default (pad, parent, event);
|
ret = gst_pad_event_default (pad, parent, event);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue