mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
asfdemux: handle FIXME; normalize preroll
This commit is contained in:
parent
b6d4fb9e4f
commit
44ebe58377
3 changed files with 6 additions and 6 deletions
|
@ -309,7 +309,7 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
|
|||
if (payload.rep_data_len >= 8) {
|
||||
payload.mo_size = GST_READ_UINT32_LE (payload.rep_data);
|
||||
payload.ts = GST_READ_UINT32_LE (payload.rep_data + 4) * GST_MSECOND;
|
||||
payload.ts -= demux->preroll * GST_MSECOND;
|
||||
payload.ts -= demux->preroll;
|
||||
asf_payload_parse_replicated_data_extensions (stream, &payload);
|
||||
|
||||
GST_LOG_OBJECT (demux, "media object size : %u", payload.mo_size);
|
||||
|
@ -364,7 +364,7 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet,
|
|||
*p_data += payload_len;
|
||||
*p_size -= payload_len;
|
||||
|
||||
ts = (payload.mo_offset - demux->preroll) * GST_MSECOND;
|
||||
ts = payload.mo_offset * GST_MSECOND - demux->preroll;
|
||||
ts_delta = payload.rep_data[0] * GST_MSECOND;
|
||||
|
||||
for (num = 0; payload_len > 0; ++num) {
|
||||
|
|
|
@ -1019,7 +1019,7 @@ all_streams_prerolled (GstASFDemux * demux)
|
|||
GstClockTime preroll_time;
|
||||
guint i, num_no_data = 0;
|
||||
|
||||
preroll_time = demux->preroll * GST_MSECOND;
|
||||
preroll_time = demux->preroll;
|
||||
|
||||
/* returns TRUE as long as there isn't a stream which (a) has data queued
|
||||
* and (b) the timestamp of last piece of data queued is < demux->preroll
|
||||
|
@ -2459,7 +2459,7 @@ gst_asf_demux_process_file (GstASFDemux * demux, guint8 * data, guint64 size)
|
|||
else
|
||||
demux->play_time = 0;
|
||||
|
||||
demux->preroll = preroll; /* FIXME: make GstClockTime */
|
||||
demux->preroll = preroll * GST_MSECOND;
|
||||
|
||||
if (demux->play_time == 0)
|
||||
demux->seekable = FALSE;
|
||||
|
@ -2467,7 +2467,7 @@ gst_asf_demux_process_file (GstASFDemux * demux, guint8 * data, guint64 size)
|
|||
GST_DEBUG_OBJECT (demux, "play_time %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (demux->play_time));
|
||||
GST_DEBUG_OBJECT (demux, "preroll %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (demux->preroll * GST_MSECOND));
|
||||
GST_TIME_ARGS (demux->preroll));
|
||||
|
||||
if (demux->play_time > 0) {
|
||||
gst_segment_set_duration (&demux->segment, GST_FORMAT_TIME,
|
||||
|
|
|
@ -160,7 +160,7 @@ struct _GstASFDemux {
|
|||
guint32 timestamp; /* in milliseconds */
|
||||
guint64 play_time;
|
||||
|
||||
guint64 preroll; /* FIXME: make into GstClockTime */
|
||||
guint64 preroll;
|
||||
guint64 pts;
|
||||
|
||||
gboolean seekable;
|
||||
|
|
Loading…
Reference in a new issue