From bc2a32969eb4db17677971def5ad5b936d9d1648 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 4 Dec 2012 15:28:29 +0200 Subject: rtsp: Parse SSRC attributes in the SDP When feeding input RTP packets to the depacketizer via custom IO, it needs to pick the right stream using the payload type for RTP packets, and using the SSRC for RTCP packets. If the first packet is an RTCP packet, we don't (currently) know the SSRC yet and thus can't pick the right RTP depacketizer to handle it. By parsing the SSRC attribute in the SDP, we can map initial RTCP packets to the right stream. Signed-off-by: Martin Storsjö --- libavformat/rtsp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavformat/rtsp.h') diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index 0226dac0f1..ff5b53207e 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -457,6 +457,9 @@ typedef struct RTSPStream { /** Enable sending RTCP feedback messages according to RFC 4585 */ int feedback; + /** SSRC for this stream, to allow identifying RTCP packets before the first RTP packet */ + uint32_t ssrc; + char crypto_suite[40]; char crypto_params[100]; } RTSPStream; -- cgit v1.2.3