diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2014-12-04 12:21:04 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-12-04 14:28:25 -0300 |
commit | a105af22f2f1d7325137b318e1e2070ce2d5bfa1 (patch) | |
tree | 0644cc6cdf6bc166aa9c1e914ca9fa461574fd11 | |
parent | a2c31e38d14bde826af9d3cd45c0664fb57c163b (diff) | |
download | gstreamer-plugins-bad-a105af22f2f1d7325137b318e1e2070ce2d5bfa1.tar.gz |
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
-rw-r--r-- | ext/smoothstreaming/gstmssmanifest.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c index 029873125..26958ebb1 100644 --- a/ext/smoothstreaming/gstmssmanifest.c +++ b/ext/smoothstreaming/gstmssmanifest.c @@ -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; |