diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2014-09-05 13:49:46 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-09-18 13:21:29 -0300 |
commit | d6ec4cec8acffaac7c2d417ee67bd111d6f15523 (patch) | |
tree | 1131717f9fb7f12e7d40477bbe31e6e94db9376c | |
parent | 56775ad5bd52fc1ad48bbaf8cac86b17733f6bd6 (diff) | |
download | gstreamer-plugins-base-d6ec4cec8acffaac7c2d417ee67bd111d6f15523.tar.gz |
basetextoverlay: Do not fail the negotiation if query fails
The allocation query failure doesn't mean that the negotiation
has failed as the element can allocate buffers itself.
Instead, only fail if the pads are flushing and the allocation
query failed.
https://bugzilla.gnome.org/show_bug.cgi?id=735844
-rw-r--r-- | ext/pango/gstbasetextoverlay.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index b67452b4d..a5f8d7e4b 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -721,6 +721,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps) GstCapsFeatures *f; GstCaps *original_caps; gboolean original_has_meta = FALSE; + gboolean allocation_ret = TRUE; GST_DEBUG_OBJECT (overlay, "performing negotiation"); @@ -782,7 +783,7 @@ 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; + allocation_ret = FALSE; } if (caps_has_meta && gst_query_find_allocation_meta (query, @@ -794,10 +795,8 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps) 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); - + if (!allocation_ret && overlay->video_flushing) { + ret = FALSE; } 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 @@ -811,6 +810,11 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps) } } + if (!ret) { + GST_DEBUG_OBJECT (overlay, "negotiation failed, schedule reconfigure"); + gst_pad_mark_reconfigure (overlay->srcpad); + } + gst_caps_unref (caps); return ret; |