mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
qtdemux: port segment event creation to 0.11
This commit is contained in:
parent
748304ced7
commit
e523b42d41
1 changed files with 6 additions and 4 deletions
|
@ -2440,11 +2440,13 @@ qtdemux_parse_moof (GstQTDemux * qtdemux, const guint8 * buffer, guint length,
|
||||||
qtdemux_parse_tfdt (qtdemux, &tfdt_data, &decode_time);
|
qtdemux_parse_tfdt (qtdemux, &tfdt_data, &decode_time);
|
||||||
/* If there is a new segment pending, update the time/position */
|
/* If there is a new segment pending, update the time/position */
|
||||||
if (qtdemux->pending_newsegment) {
|
if (qtdemux->pending_newsegment) {
|
||||||
|
GstSegment segment;
|
||||||
|
|
||||||
|
gst_segment_init (&segment, GST_FORMAT_TIME);
|
||||||
|
segment.time = gst_util_uint64_scale (decode_time,
|
||||||
|
GST_SECOND, stream->timescale);
|
||||||
gst_event_replace (&qtdemux->pending_newsegment,
|
gst_event_replace (&qtdemux->pending_newsegment,
|
||||||
gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME,
|
gst_event_new_segment (&segment));
|
||||||
0, GST_CLOCK_TIME_NONE,
|
|
||||||
gst_util_uint64_scale (decode_time,
|
|
||||||
GST_SECOND, stream->timescale)));
|
|
||||||
/* ref added when replaced, release the original _new one */
|
/* ref added when replaced, release the original _new one */
|
||||||
gst_event_unref (qtdemux->pending_newsegment);
|
gst_event_unref (qtdemux->pending_newsegment);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue