basetextoverlay: use correct segment for text

video time uses the 'segment' and the text time should use
the 'text_segment'.

If different segments are used for video and text it would
lead to out of sync video/subtitles.
This commit is contained in:
Thiago Santos 2014-02-07 02:09:10 -03:00
parent c6915ea785
commit ec7724c095

View file

@ -2194,11 +2194,11 @@ wait_for_text_buf:
/* If timestamp and duration are valid */
if (valid_text_time) {
text_running_time =
gst_segment_to_running_time (&overlay->segment, GST_FORMAT_TIME,
text_start);
gst_segment_to_running_time (&overlay->text_segment,
GST_FORMAT_TIME, text_start);
text_running_time_end =
gst_segment_to_running_time (&overlay->segment, GST_FORMAT_TIME,
text_end);
gst_segment_to_running_time (&overlay->text_segment,
GST_FORMAT_TIME, text_end);
}
GST_LOG_OBJECT (overlay, "T: %" GST_TIME_FORMAT " - %" GST_TIME_FORMAT,