mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
mssdemux: fix getting current position in segments when after last one
For live streams this makes a difference when resyncing after a Manifest refresh, otherwise it doesn't know where to restart
This commit is contained in:
parent
a2c31e38d1
commit
a105af22f2
1 changed files with 8 additions and 2 deletions
|
@ -855,8 +855,14 @@ gst_mss_stream_get_fragment_gst_timestamp (GstMssStream * stream)
|
|||
|
||||
g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
|
||||
|
||||
if (!stream->current_fragment)
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
if (!stream->current_fragment) {
|
||||
GList *last = g_list_last (stream->fragments);
|
||||
if (last == NULL)
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
|
||||
fragment = last->data;
|
||||
return fragment->time + (fragment->duration * fragment->repetitions);
|
||||
}
|
||||
|
||||
fragment = stream->current_fragment->data;
|
||||
|
||||
|
|
Loading…
Reference in a new issue