Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
luzpaz
gstreamer
Commits
67666768
Commit
67666768
authored
Sep 25, 2010
by
Mark Nauwelaerts
Committed by
Tim-Philipp Müller
Apr 08, 2011
Browse files
baseparse: use determined seekability in answering SEEKING query
parent
ba3d5da1
Changes
1
Hide whitespace changes
Inline
Side-by-side
gst/audioparsers/gstbaseparse.c
View file @
67666768
...
...
@@ -2485,23 +2485,13 @@ gst_base_parse_query (GstPad * pad, GstQuery * query)
GST_LOG_OBJECT
(
parse
,
"upstream handled %d, seekable %d"
,
res
,
seekable
);
if
(
!
(
res
&&
seekable
))
{
/* TODO maybe also check upstream provides proper duration ? */
seekable
=
TRUE
;
if
(
!
gst_base_parse_get_duration
(
parse
,
GST_FORMAT_TIME
,
&
duration
)
||
duration
==
-
1
)
{
seekable
=
FALSE
;
}
else
{
GstQuery
*
q
;
q
=
gst_query_new_seeking
(
GST_FORMAT_BYTES
);
if
(
!
gst_pad_peer_query
(
parse
->
sinkpad
,
q
))
{
seekable
=
FALSE
;
}
else
{
gst_query_parse_seeking
(
q
,
&
fmt
,
&
seekable
,
NULL
,
NULL
);
}
GST_LOG_OBJECT
(
parse
,
"upstream BYTE handled %d, seekable %d"
,
res
,
seekable
);
gst_query_unref
(
q
);
seekable
=
parse
->
priv
->
upstream_seekable
;
GST_LOG_OBJECT
(
parse
,
"already determine upstream seekabled: %d"
,
seekable
);
}
gst_query_set_seeking
(
query
,
GST_FORMAT_TIME
,
seekable
,
0
,
duration
);
res
=
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment