basetextoverlay: use correct segment for text
authorThiago Santos <ts.santos@sisa.samsung.com>
Fri, 7 Feb 2014 05:09:10 +0000 (02:09 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Fri, 7 Feb 2014 05:14:52 +0000 (02:14 -0300)
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.

ext/pango/gstbasetextoverlay.c

index f074487..35d0485 100644 (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,