mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
media: handle segment query format mismatch
It's possible that the segment query returns with a different format than what we asked for, handle this case also.
This commit is contained in:
parent
52eb796bec
commit
23ec78faea
1 changed files with 4 additions and 1 deletions
|
@ -379,7 +379,10 @@ collect_media_stats (GstRTSPMedia * media)
|
||||||
/* get the current segment stop */
|
/* get the current segment stop */
|
||||||
query = gst_query_new_segment (GST_FORMAT_TIME);
|
query = gst_query_new_segment (GST_FORMAT_TIME);
|
||||||
if (gst_element_query (priv->pipeline, query)) {
|
if (gst_element_query (priv->pipeline, query)) {
|
||||||
gst_query_parse_segment (query, NULL, NULL, NULL, &stop);
|
GstFormat format;
|
||||||
|
gst_query_parse_segment (query, NULL, &format, NULL, &stop);
|
||||||
|
if (format != GST_FORMAT_TIME)
|
||||||
|
stop = -1;
|
||||||
} else {
|
} else {
|
||||||
GST_INFO ("segment query failed");
|
GST_INFO ("segment query failed");
|
||||||
stop = -1;
|
stop = -1;
|
||||||
|
|
Loading…
Reference in a new issue