mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
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.
This commit is contained in:
parent
713a4c725c
commit
0f64498843
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2007-01-25 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* 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.
|
||||
|
||||
2007-01-25 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_base_init):
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue