diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-01-29 09:45:23 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-01-29 10:08:06 +0100 |
commit | 1ee8ec79213a8cdec9802dd9e46be7ba874a6b3b (patch) | |
tree | bf72be3dabcbe27811a04420f0118f59c64cab11 | |
parent | dc7eca626497ba3466b5256a1bb99f3f5ff4e9ff (diff) |
basesrc: handle renegotiation correctly
Don't retry to negotiate when we fail to negotiate but instead produce a
NOT_NEGOTIATED error. We only want to retry negotiation if the result from
gst_pad_push() returned NOT_NEGOTIATED.
-rw-r--r-- | libs/gst/base/gstbasesrc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index b1e0a4cc1d..72448a6eed 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -2579,7 +2579,7 @@ gst_base_src_loop (GstPad * pad) if (gst_pad_check_reconfigure (pad)) { if (!gst_base_src_negotiate (src)) { gst_pad_mark_reconfigure (pad); - goto not_negotiated; + goto negotiate_failed; } } @@ -2746,7 +2746,12 @@ not_negotiated: GST_DEBUG_OBJECT (src, "Retrying to renegotiate"); return; } - GST_DEBUG_OBJECT (src, "Failed to renegotiate"); + /* fallthrough when push returns NOT_NEGOTIATED and we don't have + * a pending negotiation request on our srcpad */ + } +negotiate_failed: + { + GST_DEBUG_OBJECT (src, "Not negotiated"); ret = GST_FLOW_NOT_NEGOTIATED; goto pause; } |