mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
qtdemux: reset segment on flush stop
cca2f555d1
introduces a regression, where the demux segment is not
reset on flush stop, so the next upstream segment event will calculate
an invalid base time on the new segment to be sent downstream.
https://bugzilla.gnome.org/show_bug.cgi?id=704255
This commit is contained in:
parent
ca32442f86
commit
54bba4f60c
1 changed files with 5 additions and 1 deletions
|
@ -1803,7 +1803,6 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
|
||||||
qtdemux->element_index = NULL;
|
qtdemux->element_index = NULL;
|
||||||
#endif
|
#endif
|
||||||
qtdemux->major_brand = 0;
|
qtdemux->major_brand = 0;
|
||||||
gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
|
|
||||||
if (qtdemux->pending_newsegment)
|
if (qtdemux->pending_newsegment)
|
||||||
gst_object_unref (qtdemux->pending_newsegment);
|
gst_object_unref (qtdemux->pending_newsegment);
|
||||||
qtdemux->pending_newsegment = NULL;
|
qtdemux->pending_newsegment = NULL;
|
||||||
|
@ -1821,6 +1820,7 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
|
||||||
}
|
}
|
||||||
qtdemux->offset = 0;
|
qtdemux->offset = 0;
|
||||||
gst_adapter_clear (qtdemux->adapter);
|
gst_adapter_clear (qtdemux->adapter);
|
||||||
|
gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
|
||||||
|
|
||||||
if (hard) {
|
if (hard) {
|
||||||
for (n = 0; n < qtdemux->n_streams; n++) {
|
for (n = 0; n < qtdemux->n_streams; n++) {
|
||||||
|
@ -1970,7 +1970,11 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
|
||||||
}
|
}
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
{
|
{
|
||||||
|
guint64 dur;
|
||||||
|
|
||||||
|
dur = demux->segment.duration;
|
||||||
gst_qtdemux_reset (demux, FALSE);
|
gst_qtdemux_reset (demux, FALSE);
|
||||||
|
demux->segment.duration = dur;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
|
|
Loading…
Reference in a new issue