textoverlay: keep untimestamped textbuffer until next one
Instead of discarding untimestamped text-buffers immeditely after rendering, keep them until we receive the next text buffer. Fixes #654959
This commit is contained in:
parent
69dcacf148
commit
0667b1adf5
@ -2390,6 +2390,11 @@ gst_text_overlay_text_chain (GstPad * pad, GstBuffer * buffer)
|
||||
else if (GST_BUFFER_DURATION_IS_VALID (buffer))
|
||||
GST_BUFFER_DURATION (buffer) = clip_stop - clip_start;
|
||||
|
||||
if (overlay->text_buffer
|
||||
&& (!GST_BUFFER_TIMESTAMP_IS_VALID (overlay->text_buffer)
|
||||
|| !GST_BUFFER_DURATION_IS_VALID (overlay->text_buffer))) {
|
||||
gst_text_overlay_pop_text (overlay);
|
||||
} else {
|
||||
/* Wait for the previous buffer to go away */
|
||||
while (overlay->text_buffer != NULL) {
|
||||
GST_DEBUG ("Pad %s:%s has a buffer queued, waiting",
|
||||
@ -2402,6 +2407,7 @@ gst_text_overlay_text_chain (GstPad * pad, GstBuffer * buffer)
|
||||
goto beach;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
|
||||
gst_segment_set_last_stop (&overlay->text_segment, GST_FORMAT_TIME,
|
||||
@ -2548,7 +2554,6 @@ wait_for_text_buf:
|
||||
!GST_BUFFER_DURATION_IS_VALID (overlay->text_buffer)) {
|
||||
GST_WARNING_OBJECT (overlay,
|
||||
"Got text buffer with invalid timestamp or duration");
|
||||
pop_text = TRUE;
|
||||
valid_text_time = FALSE;
|
||||
} else {
|
||||
text_start = GST_BUFFER_TIMESTAMP (overlay->text_buffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user