assrender: Update text last stop after checking if timestamp/duration is valid

This commit is contained in:
Sebastian Dröge 2009-12-07 14:26:46 +01:00
parent a009463d3f
commit 2852ecbe12

View file

@ -654,9 +654,6 @@ gst_ass_render_chain_text (GstPad * pad, GstBuffer * buffer)
GstClockTime sub_running_time, vid_running_time; GstClockTime sub_running_time, vid_running_time;
GstClockTime sub_running_time_end; GstClockTime sub_running_time_end;
gst_segment_set_last_stop (&render->subtitle_segment, GST_FORMAT_TIME,
GST_BUFFER_TIMESTAMP (buffer));
if (render->subtitle_flushing) { if (render->subtitle_flushing) {
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
return GST_FLOW_WRONG_STATE; return GST_FLOW_WRONG_STATE;
@ -673,6 +670,9 @@ gst_ass_render_chain_text (GstPad * pad, GstBuffer * buffer)
return GST_FLOW_OK; return GST_FLOW_OK;
} }
gst_segment_set_last_stop (&render->subtitle_segment, GST_FORMAT_TIME,
GST_BUFFER_TIMESTAMP (buffer));
sub_running_time = sub_running_time =
gst_segment_to_running_time (&render->subtitle_segment, GST_FORMAT_TIME, gst_segment_to_running_time (&render->subtitle_segment, GST_FORMAT_TIME,
timestamp); timestamp);