summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-01-25 23:27:59 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-01-25 23:27:59 +0000
commit0f644988435a98b7f691616cb7f542c76a90c9fc (patch)
treebb533df41a1f3df8663ccfbd1c8b9929cb201bcd /ext
parent713a4c725cb76ddf34b6bf764e18ba1b8a66c2a9 (diff)
downloadgst-plugins-bad-0f644988435a98b7f691616cb7f542c76a90c9fc.tar.gz
gst-plugins-bad-0f644988435a98b7f691616cb7f542c76a90c9fc.tar.bz2
gst-plugins-bad-0f644988435a98b7f691616cb7f542c76a90c9fc.zip
ext/wavpack/gstwavpackparse.c: Fix the SEEKING query. We can seek if we are in pull mode, not the other way around. A...
Original commit message from CVS: * ext/wavpack/gstwavpackparse.c: (gst_wavpack_parse_src_query): Fix the SEEKING query. We can seek if we are in pull mode, not the other way around. Also set the correct format in the seeking query and handle the case where the headers are not read yet and we can't say anything about our seeking capabilities.
Diffstat (limited to 'ext')
-rw-r--r--ext/wavpack/gstwavpackparse.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/wavpack/gstwavpackparse.c b/ext/wavpack/gstwavpackparse.c
index 47f6cd54..ed1de714 100644
--- a/ext/wavpack/gstwavpackparse.c
+++ b/ext/wavpack/gstwavpackparse.c
@@ -343,14 +343,17 @@ gst_wavpack_parse_src_query (GstPad * pad, GstQuery * query)
gboolean seekable;
gint64 duration = -1;
- gst_pad_query_duration (pad, &format, &duration);
+ /* only fails if we didn't read the headers yet and can't say
+ * anything about our seeking capabilities */
+ if (!gst_pad_query_duration (pad, &format, &duration))
+ break;
/* can't seek in streaming mode yet */
GST_OBJECT_LOCK (parse);
- seekable = (parse->adapter != NULL);
+ seekable = (parse->adapter == NULL);
GST_OBJECT_UNLOCK (parse);
- gst_query_set_seeking (query, GST_FORMAT_TIME, seekable, 0, duration);
+ gst_query_set_seeking (query, format, seekable, 0, duration);
ret = TRUE;
}
break;