summaryrefslogtreecommitdiffstats
path: root/gst/liveadder
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2008-04-28 22:36:06 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-17 19:29:04 +0100
commit89566bfc8aa8dbb699d35a784722b7f13f6c3e64 (patch)
treec3e58255a2ea6f0f3ba42b26b377c4034fdfa9df /gst/liveadder
parent72efe4c3d730e24438be8ba3db616b3bcc7ae38b (diff)
downloadgst-plugins-bad-89566bfc8aa8dbb699d35a784722b7f13f6c3e64.tar.gz
gst-plugins-bad-89566bfc8aa8dbb699d35a784722b7f13f6c3e64.tar.bz2
gst-plugins-bad-89566bfc8aa8dbb699d35a784722b7f13f6c3e64.zip
[MOVED FROM GST-P-FARSIGHT] Fix deadlock on invalid timestamp error
20080428223606-3e2dc-963e48b33efaf84c16d4ec4b789a6dfb2d9358ad.gz
Diffstat (limited to 'gst/liveadder')
-rw-r--r--gst/liveadder/liveadder.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c
index a6ae91a6..54a7f475 100644
--- a/gst/liveadder/liveadder.c
+++ b/gst/liveadder/liveadder.c
@@ -798,13 +798,8 @@ gst_live_live_adder_chain (GstPad *pad, GstBuffer *buffer)
goto out;
}
- if (!GST_BUFFER_TIMESTAMP_IS_VALID(buffer)) {
- GST_ELEMENT_ERROR (adder, STREAM, FAILED,
- ("Buffer without a valid timestamp received"), (""));
- ret = GST_FLOW_ERROR;
- gst_buffer_unref (buffer);
- goto out;
- }
+ if (!GST_BUFFER_TIMESTAMP_IS_VALID(buffer))
+ goto invalid_timestamp;
/* Just see if we receive invalid timestamp/durations */
if (GST_CLOCK_TIME_IS_VALID (padprivate->expected_timestamp) &&
@@ -972,6 +967,16 @@ gst_live_live_adder_chain (GstPad *pad, GstBuffer *buffer)
gst_object_unref (adder);
return ret;
+
+ invalid_timestamp:
+
+ GST_OBJECT_UNLOCK (adder);
+ gst_buffer_unref (buffer);
+ GST_ELEMENT_ERROR (adder, STREAM, FAILED,
+ ("Buffer without a valid timestamp received"),
+ ("Invalid timestamp received on buffer"));
+
+ return GST_FLOW_ERROR;
}
/*