mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
flvmux: Mux timestampless buffers immediately
Instead of leaving them queued indefinitely, or until we're timing out and it's the only buffer queued. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7871>
This commit is contained in:
parent
969b51acb6
commit
65e071c1c8
1 changed files with 9 additions and 5 deletions
|
@ -1994,12 +1994,16 @@ gst_flv_mux_find_best_pad (GstAggregator * aggregator, GstClockTime * ts,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS_OR_PTS (buffer))) {
|
|
||||||
t = gst_flv_mux_segment_to_running_time (&apad->segment,
|
t = gst_flv_mux_segment_to_running_time (&apad->segment,
|
||||||
GST_BUFFER_DTS_OR_PTS (buffer));
|
GST_BUFFER_DTS_OR_PTS (buffer));
|
||||||
}
|
|
||||||
|
|
||||||
if (!GST_CLOCK_TIME_IS_VALID (best_ts) ||
|
if (!GST_CLOCK_TIME_IS_VALID (t)) {
|
||||||
|
GST_WARNING_OBJECT (apad, "Buffer has no timestamp: %" GST_PTR_FORMAT,
|
||||||
|
buffer);
|
||||||
|
gst_object_replace ((GstObject **) & best, GST_OBJECT (apad));
|
||||||
|
best_ts = GST_CLOCK_TIME_NONE;
|
||||||
|
done = TRUE;
|
||||||
|
} else if (!GST_CLOCK_TIME_IS_VALID (best_ts) ||
|
||||||
(GST_CLOCK_TIME_IS_VALID (t) && t < best_ts)) {
|
(GST_CLOCK_TIME_IS_VALID (t) && t < best_ts)) {
|
||||||
gst_object_replace ((GstObject **) & best, GST_OBJECT (apad));
|
gst_object_replace ((GstObject **) & best, GST_OBJECT (apad));
|
||||||
best_ts = t;
|
best_ts = t;
|
||||||
|
|
Loading…
Reference in a new issue