summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/avi/gstavidemux.c4
-rw-r--r--gst/flx/gstflxdec.c27
-rw-r--r--gst/matroska/matroska-demux.c6
-rw-r--r--gst/wavparse/gstwavparse.c4
4 files changed, 19 insertions, 22 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 1bb27c28..d363d214 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -1995,7 +1995,7 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, gboolean update)
} else
gst_pad_pause_task (avi->sinkpad);
- GST_STREAM_LOCK (avi->sinkpad);
+ GST_PAD_STREAM_LOCK (avi->sinkpad);
/* fill current_entry according to flags and update */
if (update) {
@@ -2043,7 +2043,7 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, gboolean update)
gst_pad_start_task (avi->sinkpad, (GstTaskFunction) gst_avi_demux_loop,
avi->sinkpad);
- GST_STREAM_UNLOCK (avi->sinkpad);
+ GST_PAD_STREAM_UNLOCK (avi->sinkpad);
return TRUE;
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index e3e4bcc8..0ca9fc48 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -176,32 +176,29 @@ static gboolean
gst_flxdec_src_event_handler (GstPad * pad, GstEvent * event)
{
GstFlxDec *flxdec = (GstFlxDec *) gst_pad_get_parent (pad);
-
- g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
+ gboolean ret;
/* TODO: implement the seek and other event handling */
- return gst_pad_push_event (flxdec->sinkpad, event);
+ ret = gst_pad_push_event (flxdec->sinkpad, event);
+
+ gst_object_unref (flxdec);
+
+ return ret;
}
static gboolean
gst_flxdec_sink_event_handler (GstPad * pad, GstEvent * event)
{
- GstFlxDec *flxdec = (GstFlxDec *) gst_pad_get_parent (pad);
-
- g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
-
- if (GST_EVENT_TYPE (event) == GST_EVENT_EOS ||
- GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT)
- GST_STREAM_LOCK (flxdec->srcpad);
+ GstFlxDec *flxdec;
+ gboolean ret;
- gst_pad_push_event (flxdec->srcpad, gst_event_ref (event));
+ flxdec = GST_FLXDEC (gst_pad_get_parent (pad));
- if (GST_EVENT_TYPE (event) == GST_EVENT_EOS ||
- GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT)
- GST_STREAM_UNLOCK (flxdec->srcpad);
+ ret = gst_pad_push_event (flxdec->srcpad, event);
- return TRUE;
+ gst_object_unref (flxdec);
+ return ret;
}
static void
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 0b03e31e..a89587c1 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -1102,7 +1102,7 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
/* now grab the stream lock so that streaming cannot continue, for
* non flushing seeks when the element is in PAUSED this could block
* forever. */
- GST_STREAM_LOCK (demux->sinkpad);
+ GST_PAD_STREAM_LOCK (demux->sinkpad);
GST_OBJECT_LOCK (demux);
@@ -1188,7 +1188,7 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
demux->sinkpad);
/* streaming can continue now */
- GST_STREAM_UNLOCK (demux->sinkpad);
+ GST_PAD_STREAM_UNLOCK (demux->sinkpad);
return TRUE;
@@ -1198,7 +1198,7 @@ seek_error:
* function again so that things can continue from where they left off? */
GST_DEBUG ("Got a seek error");
GST_OBJECT_UNLOCK (demux);
- GST_STREAM_UNLOCK (demux->sinkpad);
+ GST_PAD_STREAM_UNLOCK (demux->sinkpad);
return FALSE;
}
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 59835d0b..8978e1de 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -718,7 +718,7 @@ gst_wavparse_handle_seek (GstWavParse * wav, gboolean update)
else
gst_pad_pause_task (wav->sinkpad);
- GST_STREAM_LOCK (wav->sinkpad);
+ GST_PAD_STREAM_LOCK (wav->sinkpad);
if (update) {
wav->offset = wav->segment_start + wav->datastart;
@@ -749,7 +749,7 @@ gst_wavparse_handle_seek (GstWavParse * wav, gboolean update)
gst_pad_start_task (wav->sinkpad, (GstTaskFunction) gst_wavparse_loop,
wav->sinkpad);
- GST_STREAM_UNLOCK (wav->sinkpad);
+ GST_PAD_STREAM_UNLOCK (wav->sinkpad);
return TRUE;