dashdemux: Only set timestamp to the first buffer of fragments

Setting it to the other parts of the fragment is slightly wrong
and misleading as it isn't accurate enough.
This commit is contained in:
Thiago Santos 2014-05-02 18:32:56 -03:00
parent f09dd7e7a5
commit 173c353716

View file

@ -1899,22 +1899,6 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
GST_TIME_ARGS (stream->current_fragment.timestamp)); GST_TIME_ARGS (stream->current_fragment.timestamp));
GST_BUFFER_PTS (buffer) = stream->current_fragment.timestamp; GST_BUFFER_PTS (buffer) = stream->current_fragment.timestamp;
} else {
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
}
if (discont) {
GST_DEBUG_OBJECT (stream->pad, "Marking fragment as discontinuous");
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
} else {
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
}
GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
GST_BUFFER_OFFSET (buffer) =
gst_mpd_client_get_segment_index (stream->active_stream) - 1;
if (stream->pending_segment) { if (stream->pending_segment) {
if (demux->timestamp_offset == -1) if (demux->timestamp_offset == -1)
@ -1933,6 +1917,22 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
stream->position = demux->segment.position = GST_BUFFER_PTS (buffer); stream->position = demux->segment.position = GST_BUFFER_PTS (buffer);
} else {
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
}
if (discont) {
GST_DEBUG_OBJECT (stream->pad, "Marking fragment as discontinuous");
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
} else {
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
}
GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
GST_BUFFER_OFFSET (buffer) =
gst_mpd_client_get_segment_index (stream->active_stream) - 1;
/* accumulate time and size to get this chunk */ /* accumulate time and size to get this chunk */
stream->download_total_time += stream->download_total_time +=
g_get_monotonic_time () - stream->download_start_time; g_get_monotonic_time () - stream->download_start_time;