[gst-devel] [PATCH 2/3] gstreamer-0.8.9-core.patch
Pfiffer, AndrewX K
andrewx.k.pfiffer at intel.com
Fri Jun 10 13:48:32 CEST 2005
[this patch is relative to gstreamer-0.8.9]
--
This patch was developed as part of ongoing work in support of the
Consumer Electronics Linux Forum (CELF). [ http://www.celinuxforum.org/
]
Signed-off-by: Saikat Sanyal <saikat at alumnux.com>
Signed-off-by: Andrew Pfiffer <andrewx.k.pfiffer at intel.com>
This patch addresses two race conditions in Gst-Pads and Gst-Elements
encountered in thread-based scenarios of GStreamer applications.
--
diff -Naur gstreamer-0.8.9/gst/gstelement.c
gstreamer-0.8.9-ipvr/gst/gstelement.c
--- gstreamer-0.8.9/gst/gstelement.c 2005-02-08 15:12:41.000000000
+0530
+++ gstreamer-0.8.9-ipvr/gst/gstelement.c 2005-04-25
12:14:42.453712704 +0530
@@ -2990,11 +2990,16 @@
if (element->clock) {
GstClockTimeDiff time = gst_clock_get_event_time
(element->clock);
+ if (!(time >= element->base_time)) {
+ /* Race Condition - Deactivate anyways. */
+ goto deact;
+ }
g_assert (time >= element->base_time);
element->base_time = time - element->base_time;
GST_CAT_LOG_OBJECT (GST_CAT_CLOCK, element, "setting base time
to %"
G_GINT64_FORMAT, element->base_time);
}
+deact:
gst_element_pads_activate (element, FALSE);
break;
case GST_STATE_PAUSED_TO_PLAYING:
diff -Naur gstreamer-0.8.9/gst/gstpad.c
gstreamer-0.8.9-ipvr/gst/gstpad.c
--- gstreamer-0.8.9/gst/gstpad.c 2005-02-07 21:04:28.000000000
+0530
+++ gstreamer-0.8.9-ipvr/gst/gstpad.c 2005-04-25 12:10:00.804529888
+0530
@@ -3360,6 +3360,10 @@
}
if (data) {
+ if (!link) {
+ /* Link is NULL - Race Condition hit. */
+ return data;
+ }
if (!link->engaged) {
g_assert (link->temp_store == NULL);
if (GST_IS_BUFFER (data)) {
More information about the gstreamer-devel
mailing list