mssdemux: always use timescale for gst timestamp calculation
Not doing this can lead the demuxer to attempt downloading fragments for an invalid start time. The server would then send a HTTP Precondition failed error, the demuxer would try some more times to download the invalid fragment and eventually error out. https://bugzilla.gnome.org/show_bug.cgi?id=754523
This commit is contained in:
parent
a1d39d385d
commit
5d4388bf9e
@ -904,7 +904,7 @@ gst_mss_stream_get_fragment_gst_timestamp (GstMssStream * stream)
|
|||||||
guint64 timescale;
|
guint64 timescale;
|
||||||
GstMssStreamFragment *fragment;
|
GstMssStreamFragment *fragment;
|
||||||
|
|
||||||
g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
|
g_return_val_if_fail (stream->active, GST_CLOCK_TIME_NONE);
|
||||||
|
|
||||||
if (!stream->current_fragment) {
|
if (!stream->current_fragment) {
|
||||||
GList *last = g_list_last (stream->fragments);
|
GList *last = g_list_last (stream->fragments);
|
||||||
@ -912,13 +912,12 @@ gst_mss_stream_get_fragment_gst_timestamp (GstMssStream * stream)
|
|||||||
return GST_CLOCK_TIME_NONE;
|
return GST_CLOCK_TIME_NONE;
|
||||||
|
|
||||||
fragment = last->data;
|
fragment = last->data;
|
||||||
return fragment->time + (fragment->duration * fragment->repetitions);
|
time = fragment->time + (fragment->duration * fragment->repetitions);
|
||||||
|
} else {
|
||||||
|
fragment = stream->current_fragment->data;
|
||||||
|
time = fragment->time + (fragment->duration * stream->fragment_repetition_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment = stream->current_fragment->data;
|
|
||||||
|
|
||||||
time =
|
|
||||||
fragment->time + (fragment->duration * stream->fragment_repetition_index);
|
|
||||||
timescale = gst_mss_stream_get_timescale (stream);
|
timescale = gst_mss_stream_get_timescale (stream);
|
||||||
return (GstClockTime) gst_util_uint64_scale_round (time, GST_SECOND,
|
return (GstClockTime) gst_util_uint64_scale_round (time, GST_SECOND,
|
||||||
timescale);
|
timescale);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user