Skip to content
Snippets Groups Projects
Commit 3f88d10f authored by Wim Taymans's avatar Wim Taymans Committed by Sebastian Dröge
Browse files

segment: take offset into account in _to_position()

Take the offset into account when converting between running-time and
segment positions.
parent ca585245
No related branches found
No related tags found
Loading
......@@ -651,7 +651,7 @@ gst_segment_to_position (const GstSegment * segment, GstFormat format,
if (G_LIKELY (segment->rate > 0.0)) {
/* bring to corrected position in segment */
result += start;
result += start + segment->offset;
/* outside of the segment boundary stop */
if (G_UNLIKELY (stop != -1 && result > stop))
......@@ -663,7 +663,7 @@ gst_segment_to_position (const GstSegment * segment, GstFormat format,
return -1;
/* bring to corrected position in segment */
result = stop - result;
result = stop - result - segment->offset;
}
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment