mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 06:22:29 +00:00
stream: Use stream duration as stream-stop if segment was not configured with a stop
Allowing client to know stream duration when no seeking happened. https://bugzilla.gnome.org/show_bug.cgi?id=783435
This commit is contained in:
parent
c04e3b07dd
commit
8b38aa9c46
1 changed files with 13 additions and 0 deletions
|
@ -3852,7 +3852,20 @@ gst_rtsp_stream_query_stop (GstRTSPStream * stream, gint64 * stop)
|
|||
if (format != GST_FORMAT_TIME)
|
||||
*stop = -1;
|
||||
}
|
||||
|
||||
gst_query_unref (query);
|
||||
if (!GST_CLOCK_TIME_IS_VALID (*stop)) {
|
||||
query = gst_query_new_duration (GST_FORMAT_TIME);
|
||||
if ((ret = gst_element_query (sink, query))) {
|
||||
GstFormat format;
|
||||
|
||||
gst_query_parse_duration (query, &format, stop);
|
||||
if (format != GST_FORMAT_TIME)
|
||||
*stop = -1;
|
||||
}
|
||||
gst_query_unref (query);
|
||||
}
|
||||
|
||||
gst_object_unref (sink);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue