• Sebastian Dröge's avatar
    rtspsrc: Use a mutex for protecting against concurrent send/receives · a722f6e8
    Sebastian Dröge authored
    We currently send data to the RTSP connection from multiple threads:
    whenever a command is to be handled and whenever RTCP is generated. This
    can cause data corruption or worse if both happen at the same time.
    As such, protect gst_rtsp_connection_send() and gst_rtsp_connection_receive()
    calls with a mutex. While this means that we hold a mutex during the IO
    operation, this is not actually a problem as the IO operation can be
    interrupted (gst_rtsp_connection_flush()) at any time and is blocking by
    itself anyway.