rtsp: Move message parsing to a separate function