From d34e326425fed418024441602d13535edcae6b41 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 17 Nov 2016 20:18:55 +0200 Subject: [PATCH] textoverlay: Mark pad as needing reconfiguration again if it failed And return FLUSHING instead of NOT_NEGOTIATED on flushing pads. https://bugzilla.gnome.org/show_bug.cgi?id=774623 --- ext/pango/gstbasetextoverlay.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index 1efe703..54a6d4c 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -923,12 +923,16 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps) gst_caps_unref (overlay_caps); gst_caps_unref (caps); + if (!ret) + gst_pad_mark_reconfigure (overlay->srcpad); + return ret; no_format: { if (caps) gst_caps_unref (caps); + gst_pad_mark_reconfigure (overlay->srcpad); return FALSE; } } @@ -2211,8 +2215,16 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay, if (overlay->composition == NULL) goto done; - if (gst_pad_check_reconfigure (overlay->srcpad)) - gst_base_text_overlay_negotiate (overlay, NULL); + if (gst_pad_check_reconfigure (overlay->srcpad)) { + if (!gst_base_text_overlay_negotiate (overlay, NULL)) { + gst_pad_mark_reconfigure (overlay->srcpad); + gst_buffer_unref (video_frame); + if (GST_PAD_IS_FLUSHING (overlay->srcpad)) + return GST_FLOW_FLUSHING; + else + return GST_FLOW_NOT_NEGOTIATED; + } + } video_frame = gst_buffer_make_writable (video_frame); -- 2.7.4