mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
Quickfix for wrong timestamps... No final solution yet
Original commit message from CVS: Quickfix for wrong timestamps... No final solution yet
This commit is contained in:
parent
5345dd61ec
commit
69482984d5
1 changed files with 8 additions and 3 deletions
|
@ -1652,6 +1652,8 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux *demux,
|
||||||
|
|
||||||
/* time (relative to cluster time) */
|
/* time (relative to cluster time) */
|
||||||
time = (* (gint16 *) data) * demux->time_scale;
|
time = (* (gint16 *) data) * demux->time_scale;
|
||||||
|
/* I think this is mis-documented in the matroska sources, we should
|
||||||
|
* probably shift values (EBML-style) on this value... */
|
||||||
time = GINT16_FROM_BE (time);
|
time = GINT16_FROM_BE (time);
|
||||||
data += 2; size -= 2;
|
data += 2; size -= 2;
|
||||||
flags = * (guint8 *) data;
|
flags = * (guint8 *) data;
|
||||||
|
@ -1734,9 +1736,12 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux *demux,
|
||||||
GST_BUFFER_SIZE (buf) - size,
|
GST_BUFFER_SIZE (buf) - size,
|
||||||
lace_size[n]);
|
lace_size[n]);
|
||||||
|
|
||||||
if (cluster_time != GST_CLOCK_TIME_NONE)
|
if (cluster_time != GST_CLOCK_TIME_NONE) {
|
||||||
GST_BUFFER_TIMESTAMP (sub) = cluster_time + time;
|
if (time < 0 && (-time) > cluster_time)
|
||||||
|
GST_BUFFER_TIMESTAMP (sub) = cluster_time;
|
||||||
|
else
|
||||||
|
GST_BUFFER_TIMESTAMP (sub) = cluster_time + time;
|
||||||
|
}
|
||||||
/* FIXME: duration */
|
/* FIXME: duration */
|
||||||
|
|
||||||
gst_pad_push (demux->src[stream]->pad, GST_DATA (sub));
|
gst_pad_push (demux->src[stream]->pad, GST_DATA (sub));
|
||||||
|
|
Loading…
Reference in a new issue