ext/pango/gsttextoverlay.c: Fix wrong EOS handling on text pad. We were releasing the queued text buffer when we shou...

Original commit message from CVS:
2006-03-07  Julien MOUTTE  <julien@moutte.net>

* ext/pango/gsttextoverlay.c: (gst_text_overlay_text_event),
(gst_text_overlay_video_event): Fix wrong EOS handling on text
pad. We were releasing the queued text buffer when we should keep
it until video pad gets EOS or discard the text buffer because it's
too old. That was eating the last subtitle buffer. Add some more
debug.
This commit is contained in:
Julien Moutte 2006-03-07 21:56:09 +00:00
parent bddbeccfdb
commit 010e22b641
2 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2006-03-07 Julien MOUTTE <julien@moutte.net>
* ext/pango/gsttextoverlay.c: (gst_text_overlay_text_event),
(gst_text_overlay_video_event): Fix wrong EOS handling on text
pad. We were releasing the queued text buffer when we should keep
it until video pad gets EOS or discard the text buffer because it's
too old. That was eating the last subtitle buffer. Add some more
debug.
2006-03-07 Tim-Philipp Müller <tim at centricular dot net>
* ext/pango/gsttextoverlay.c: (gst_text_overlay_render_text),

View file

@ -1021,6 +1021,8 @@ gst_text_overlay_text_event (GstPad * pad, GstEvent * event)
overlay = GST_TEXT_OVERLAY (gst_pad_get_parent (pad));
GST_DEBUG_OBJECT (pad, "received event %s", GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT:
/* We just ignore those events from the text pad */
@ -1047,7 +1049,8 @@ gst_text_overlay_text_event (GstPad * pad, GstEvent * event)
GST_OBJECT_LOCK (overlay);
/* We use flushing to make sure we return WRONG_STATE */
overlay->text_flushing = TRUE;
gst_text_overlay_pop_text (overlay);
/* We don't signal anything here because we want to keep the last queued
buffer until video pad receives EOS or discard the buffer */
GST_OBJECT_UNLOCK (overlay);
gst_event_unref (event);
ret = TRUE;
@ -1071,6 +1074,8 @@ gst_text_overlay_video_event (GstPad * pad, GstEvent * event)
overlay = GST_TEXT_OVERLAY (gst_pad_get_parent (pad));
GST_DEBUG_OBJECT (pad, "received event %s", GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT:
{