Handle GET_PARAMETER keepalive responses during PAUSE
Fixes ticket#14939
Because Demux() is not called during PAUSE the GET_PARAMETER keepalives are
sent by the TimeoutPrevention thread. However this was not giving Live555
a chance to handle the responses through doEventLoop(), and so the responses
were queued up. Because of a separate issue in handling pipelined
GET_PARAMETER responses in Live555 itself (now fixed, 2015-06-24), after two
GPs this would result in the loss of the PLAY response on resume, locking
everything up.
Even with the fix to Live555, queuing up all GP responses until the stream
is resumed is unpleasant and will eventually overflow Live555's response
buffer.
This fix calls the usual Live555 response handling mechanism for GPs sent
in the background thread during pause. I have not added it to the normal
GP sends in Demux() because that calls doEventLoop() anyway, and to do so
would add a delay to normal processing.
TimeoutPrevention now requires access to p_demux itself, not just p_sys.
A mutex has been added to protect LIVE555 from simultaneous calls within
Demux() or Control() and the TimeoutPrevention() thread
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Showing
Please register or sign in to comment