mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 01:31:03 +00:00
flvmux: Consider timestamps before segment start to map to segment start
Instead of mapping them to running time 0, which is wrong if e.g. the segment base is not equal to 0. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7780>
This commit is contained in:
parent
356aca593d
commit
4ea16ff146
1 changed files with 2 additions and 2 deletions
|
@ -1672,9 +1672,9 @@ static GstClockTime
|
|||
gst_flv_mux_segment_to_running_time (const GstSegment * segment, GstClockTime t)
|
||||
{
|
||||
/* we can get a dts before the segment, if dts < pts and pts is inside
|
||||
* the segment, so we consider early times as 0 */
|
||||
* the segment, so we consider early times to map to segment start */
|
||||
if (t < segment->start)
|
||||
return 0;
|
||||
t = segment->start;
|
||||
return gst_segment_to_running_time (segment, GST_FORMAT_TIME, t);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue