diff options
author | Arnaud Vrac <avrac@freebox.fr> | 2014-09-04 15:06:31 +0200 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-09-18 13:20:36 -0300 |
commit | a5acd930a2af49a2f606163e3033ea7b945a79f0 (patch) | |
tree | 9c9e279387ca3075709e266cf18b69bc3df2c8cf | |
parent | 5fe62e5f01c9cd26e1d312215b252bbe8c98443a (diff) | |
download | gstreamer-plugins-base-a5acd930a2af49a2f606163e3033ea7b945a79f0.tar.gz |
basetextoverlay: schedule reconfigure on source pad when negotiation fails
The source pad might be flushing while negotiating, resulting in
set_caps or the ALLOCATION query failing. In this case set the
reconfigure flag on the source pad so that negotiation is retried on the
next buffer.
-rw-r--r-- | ext/pango/gstbasetextoverlay.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index 8e43044cc..c3452a7c1 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -782,19 +782,23 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps) if (!gst_pad_peer_query (overlay->srcpad, query)) { /* no problem, we use the query defaults */ GST_DEBUG_OBJECT (overlay, "ALLOCATION query failed"); + ret = FALSE; } if (caps_has_meta && gst_query_find_allocation_meta (query, GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, NULL)) attach = TRUE; - overlay->attach_compo_to_buffer = attach; gst_query_unref (query); - } else { - overlay->attach_compo_to_buffer = FALSE; } - if (original_caps && !original_has_meta && !attach) { + overlay->attach_compo_to_buffer = attach; + + if (!ret && overlay->video_flushing) { + GST_DEBUG_OBJECT (overlay, "negotiation failed, schedule reconfigure"); + gst_pad_mark_reconfigure (overlay->srcpad); + + } else if (original_caps && !original_has_meta && !attach) { if (caps_has_meta) { /* Some elements (fakesink) claim to accept the meta on caps but won't put it in the allocation query result, this leads below |