Possible race condition when fetching rtp info
Submitted by Joakim Johansson
Link to original bug (#769979)
Description
If the application do not send pause before a new play request then is there a possibility for a race condition to occur when fetching the RTP-Info.
This is easily triggered by adding a short sleep just before
/* grab RTPInfo from the media now */
rtpinfo = gst_rtsp_session_media_get_rtpinfo (sessmedia);
in rtsp-client, handle_play_request and then execute two Play requests without a Pause in between.
Running a test case executing 10 Play requests with 1s delay between each other triggers this problem 80% of the times (without short sleep) and since the test case is checking the D-bit in the extension header is it mandatory that the RTP Info finds the absolute first rtp package after the play command.
The solution is to perform a forced pause if the application have not send a Pause command before the Play command.