Unsolicited server responses cause RTSP streaming to crash

If the set up of the RTSP stream contains an incorrect or otherwise
problematic URL, some servers will send an unsolicited server response
that contains a negative number in the sequence number (CSeq) field.

This negative value is not returned from the function findPendingRequest(),
so the check in notifyResponseListener() will not work.  Instead there will
be a crash when 0 is used as the index to find a matching request/response
pair that doesn’t exist.

The fix is to return the received sequence number also when it is an
unsolicited server-client message.

Change-Id: Iedaba8a63dece7b43bce007069baefbfd10970b8
1 file changed