mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
isomp4: Allow duration queries to be forwarded upstream
When receiving a duration query for TIME format, try to query upstream, and only if upstream fails fall back to qtdemux duration handling.
This commit is contained in:
parent
6d158775bb
commit
998534a2a1
1 changed files with 9 additions and 5 deletions
|
@ -720,12 +720,16 @@ gst_qtdemux_handle_src_query (GstPad * pad, GstObject * parent,
|
|||
|
||||
gst_query_parse_duration (query, &fmt, NULL);
|
||||
if (fmt == GST_FORMAT_TIME) {
|
||||
gint64 duration = -1;
|
||||
/* First try to query upstream */
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
if (!res) {
|
||||
gint64 duration = -1;
|
||||
|
||||
gst_qtdemux_get_duration (qtdemux, &duration);
|
||||
if (duration > 0) {
|
||||
gst_query_set_duration (query, GST_FORMAT_TIME, duration);
|
||||
res = TRUE;
|
||||
gst_qtdemux_get_duration (qtdemux, &duration);
|
||||
if (duration > 0) {
|
||||
gst_query_set_duration (query, GST_FORMAT_TIME, duration);
|
||||
res = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue