summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2010-04-18 20:46:37 +0300
committerStefan Kost <ensonic@users.sf.net>2010-04-30 09:24:14 +0300
commit274f80c7a18add42fd795dba60a04cfdd8aa350c (patch)
treebcba94ffe6c55763610c697bea131b9f90b78ab3
parentab223520ed2300f70a9c967dd1ea7fbc23d23607 (diff)
adder: only accept seek-types none and set
Previously we were also acting on cur and end, but treating them like none.
-rw-r--r--gst/adder/gstadder.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c
index cdf964897..d5b7466e1 100644
--- a/gst/adder/gstadder.c
+++ b/gst/adder/gstadder.c
@@ -706,6 +706,19 @@ gst_adder_src_event (GstPad * pad, GstEvent * event)
gst_event_parse_seek (event, &adder->segment_rate, NULL, &flags, &curtype,
&cur, &endtype, &end);
+ if ((curtype != GST_SEEK_TYPE_NONE) && (curtype != GST_SEEK_TYPE_SET)) {
+ result = FALSE;
+ GST_DEBUG_OBJECT (adder,
+ "seeking failed, unhandled seek type for start: %d", curtype);
+ goto done;
+ }
+ if ((endtype != GST_SEEK_TYPE_NONE) && (endtype != GST_SEEK_TYPE_SET)) {
+ result = FALSE;
+ GST_DEBUG_OBJECT (adder,
+ "seeking failed, unhandled seek type for end: %d", endtype);
+ goto done;
+ }
+
flush = (flags & GST_SEEK_FLAG_FLUSH) == GST_SEEK_FLAG_FLUSH;
/* check if we are flushing */
@@ -773,6 +786,8 @@ gst_adder_src_event (GstPad * pad, GstEvent * event)
result = forward_event (adder, event, FALSE);
break;
}
+
+done:
gst_object_unref (adder);
return result;