summaryrefslogtreecommitdiff
path: root/ext/gio
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gio')
-rw-r--r--ext/gio/gstgiobasesink.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/ext/gio/gstgiobasesink.c b/ext/gio/gstgiobasesink.c
index 4818e4edf..7ef5fca95 100644
--- a/ext/gio/gstgiobasesink.c
+++ b/ext/gio/gstgiobasesink.c
@@ -208,25 +208,23 @@ gst_gio_base_sink_event (GstBaseSink * base_sink, GstEvent * event)
return TRUE;
switch (GST_EVENT_TYPE (event)) {
- case GST_EVENT_NEWSEGMENT:
+ case GST_EVENT_SEGMENT:
if (G_IS_OUTPUT_STREAM (sink->stream)) {
- GstFormat format;
- gint64 offset;
+ GstSegment segment;
- gst_event_parse_new_segment (event, NULL, NULL, NULL, &format, &offset,
- NULL, NULL);
+ gst_event_parse_segment (event, &segment);
- if (format != GST_FORMAT_BYTES) {
- GST_WARNING_OBJECT (sink, "ignored NEWSEGMENT event in %s format",
- gst_format_get_name (format));
+ if (segment.format != GST_FORMAT_BYTES) {
+ GST_WARNING_OBJECT (sink, "ignored SEGMENT event in %s format",
+ gst_format_get_name (segment.format));
break;
}
if (GST_GIO_STREAM_IS_SEEKABLE (sink->stream)) {
- ret = gst_gio_seek (sink, G_SEEKABLE (sink->stream), offset,
+ ret = gst_gio_seek (sink, G_SEEKABLE (sink->stream), segment.start,
sink->cancel);
if (ret == GST_FLOW_OK)
- sink->position = offset;
+ sink->position = segment.start;
} else {
ret = GST_FLOW_NOT_SUPPORTED;
}