textoverlay: continue processing text when silent
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 27 Oct 2011 13:48:52 +0000 (14:48 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 8 Nov 2011 12:02:49 +0000 (12:02 +0000)
This prevents playback wegding when text buffers are
left to pile up.

https://bugzilla.gnome.org/show_bug.cgi?id=662829

ext/pango/gsttextoverlay.c

index e33ee5a..d57cdf4 100644 (file)
@@ -2542,7 +2542,7 @@ wait_for_text_buf:
   if (overlay->video_eos)
     goto have_eos;
 
-  if (overlay->silent) {
+  if (overlay->silent && !overlay->text_linked) {
     GST_OBJECT_UNLOCK (overlay);
     ret = gst_pad_push (overlay->srcpad, buffer);
 
@@ -2632,6 +2632,11 @@ wait_for_text_buf:
         GST_OBJECT_UNLOCK (overlay);
         /* Push the video frame */
         ret = gst_pad_push (overlay->srcpad, buffer);
+      } else if (overlay->silent) {
+        GST_LOG_OBJECT (overlay, "silent enabled, pushing video buf");
+        GST_OBJECT_UNLOCK (overlay);
+        /* Push the video frame */
+        ret = gst_pad_push (overlay->srcpad, buffer);
       } else {
         gchar *in_text;
         gsize in_size;