rtspsrc: clip output segment on accurate seeks
authorMathieu Duponchelle <mathieu@centricular.com>
Thu, 29 Aug 2019 19:29:34 +0000 (21:29 +0200)
committerMathieu Duponchelle <mduponchelle1@gmail.com>
Fri, 30 Aug 2019 14:50:21 +0000 (14:50 +0000)
commit37eca8a12c1ca6ccb468c93cd29d500a65e36d85
tree379cba1d0316051c26fb6c5282d03ff7731a4b4c
parent0017115494c0ed4c9c2269ac25771e7618683b3b
rtspsrc: clip output segment on accurate seeks

The output segment is only used in ONVIF mode.

The previous behaviour was to output a segment computed from
the Range response sent by the server.

In ONVIF mode, servers will start serving from the appropriate
synchronization point (keyframe), and the Range in response will
start at that position.

This means rtspsrc can now perform truly accurate seeks in that
mode, by clipping the output segment to the values requested in
the seek. The decoder will then discard out of segment buffers
and playback will start without artefacts at the exact requested
position, similar to the behaviour of a demuxer when an accurate
seek is requested.
gst/rtsp/gstrtspsrc.c
gst/rtsp/gstrtspsrc.h