mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
rtspsrc: Parse Speed/Scale before Range in responses
Parse the speed and scale in the server's response *before* the range, so that the range start/stop are swapped (or not swapped) correctly based on the server's actual chosen values. Otherwise, the old rate from the segment is used - what the last seek asked for, but not necessarily what the server chooses. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6248>
This commit is contained in:
parent
57013e1a7c
commit
f53dbb28b2
1 changed files with 6 additions and 6 deletions
|
@ -9100,12 +9100,6 @@ restart:
|
|||
|
||||
gst_rtsp_message_unset (&request);
|
||||
|
||||
/* parse RTP npt field. This is the current position in the stream (Normal
|
||||
* Play Time) and should be put in the NEWSEGMENT position field. */
|
||||
if (gst_rtsp_message_get_header (&response, GST_RTSP_HDR_RANGE, &hval,
|
||||
0) == GST_RTSP_OK)
|
||||
gst_rtspsrc_parse_range (src, hval, segment, FALSE);
|
||||
|
||||
/* assume 1.0 rate now, overwrite when the SCALE or SPEED headers are present. */
|
||||
segment->rate = 1.0;
|
||||
|
||||
|
@ -9119,6 +9113,12 @@ restart:
|
|||
segment->rate = gst_rtspsrc_get_float (hval);
|
||||
}
|
||||
|
||||
/* parse RTP npt field. This is the current position in the stream (Normal
|
||||
* Play Time) and should be put in the NEWSEGMENT position field. */
|
||||
if (gst_rtsp_message_get_header (&response, GST_RTSP_HDR_RANGE, &hval,
|
||||
0) == GST_RTSP_OK)
|
||||
gst_rtspsrc_parse_range (src, hval, segment, FALSE);
|
||||
|
||||
/* parse the RTP-Info header field (if ANY) to get the base seqnum and timestamp
|
||||
* for the RTP packets. If this is not present, we assume all starts from 0...
|
||||
* This is info for the RTP session manager that we pass to it in caps. */
|
||||
|
|
Loading…
Reference in a new issue