libs/gst/base/: Don't randomly and silently reset a segment when the format changes as this is a bug somewhere upstre...

Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_preroll_object), (gst_base_sink_get_position):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
Don't randomly and silently reset a segment when the format
changes as this is a bug somewhere upstream. Fixes #330379.
This commit is contained in:
Wim Taymans 2006-06-14 10:31:43 +00:00
parent fb4ad149d6
commit b9000a7878
4 changed files with 16 additions and 13 deletions

View file

@ -1,3 +1,13 @@
2006-06-14 Wim Taymans <wim@fluendo.com>
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_preroll_object), (gst_base_sink_get_position):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc):
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
Don't randomly and silently reset a segment when the format
changes as this is a bug somewhere upstream. Fixes #330379.
2006-06-14 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Wouter Paesen <wouter at kangaroot net>

View file

@ -709,11 +709,10 @@ gst_base_sink_configure_segment (GstBaseSink * basesink, GstPad * pad,
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
&start, &stop, &time);
/* The segment is protected with both the STREAM_LOCK and the OBJECT_LOCK.
* We protect with the OBJECT_LOCK so that we can use the values to
* safely answer a POSITION query. */
GST_OBJECT_LOCK (basesink);
if (segment->format != format)
gst_segment_init (segment, format);
gst_segment_set_newsegment_full (segment, update, rate, arate, format, start,
stop, time);

View file

@ -1177,12 +1177,6 @@ gst_base_transform_sink_eventfunc (GstBaseTransform * trans, GstEvent * event)
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
&start, &stop, &time);
if (trans->segment.format != format)
gst_segment_init (&trans->segment, format);
gst_segment_set_newsegment_full (&trans->segment, update, rate, arate,
format, start, stop, time);
trans->have_newsegment = TRUE;
if (format == GST_FORMAT_TIME) {
@ -1200,6 +1194,9 @@ gst_base_transform_sink_eventfunc (GstBaseTransform * trans, GstEvent * event)
trans->segment.start, trans->segment.stop,
trans->segment.time, trans->segment.accum);
}
gst_segment_set_newsegment_full (&trans->segment, update, rate, arate,
format, start, stop, time);
break;
}
default:

View file

@ -953,9 +953,6 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
", stop %" GST_TIME_FORMAT, GST_TIME_ARGS (start),
GST_TIME_ARGS (stop));
if (data->segment.format != format)
gst_segment_init (&data->segment, format);
gst_segment_set_newsegment_full (&data->segment, update, rate, arate,
format, start, stop, time);