mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
nlecomposition: Do not forward QoS event while setting up the new stack
Otherwise we might end up dropping buffers even before prerolling the sources Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6032>
This commit is contained in:
parent
1b01415c3b
commit
5051a34318
1 changed files with 11 additions and 2 deletions
|
@ -2062,6 +2062,14 @@ nle_composition_event_handler (GstPad * ghostpad, GstObject * parent,
|
|||
*
|
||||
*/
|
||||
|
||||
if (comp->priv->stack_initialization_seek
|
||||
|| comp->priv->waiting_serialized_query_or_buffer) {
|
||||
GST_INFO_OBJECT (comp,
|
||||
"QoS event while setting up new stack... discarding");
|
||||
|
||||
goto beach;
|
||||
}
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (priv->seek_segment->start)) {
|
||||
GstClockTimeDiff curdiff;
|
||||
|
||||
|
@ -2084,10 +2092,11 @@ nle_composition_event_handler (GstPad * ghostpad, GstObject * parent,
|
|||
|
||||
/* Substract the amount of running time we've already outputted
|
||||
* until the currently configured pipeline from the QoS timestamp.*/
|
||||
GstClockTime oldtimestamp = timestamp;
|
||||
timestamp -= curdiff;
|
||||
GST_DEBUG_OBJECT (comp,
|
||||
"Creating new QoS event with timestamp %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (timestamp));
|
||||
"Creating new QoS event with timestamp %" GST_TIMEP_FORMAT " new: %"
|
||||
GST_TIME_FORMAT, &oldtimestamp, GST_TIME_ARGS (timestamp));
|
||||
event = gst_event_new_qos (qostype, prop, diff, timestamp);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue