summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-02-13 17:05:43 +0200
committerMartin Storsjö <martin@martin.st>2012-02-16 16:14:35 +0100
commitf3a094f2da26f62f3461e78a22b115ab8a700b8d (patch)
tree5a47b1e12d774c6633dcd5284235c340772fc899 /libavformat/rtsp.c
parent17b11ffec7991a9f61a0354830759644ec54f78e (diff)
sdp: Ignore RTCP packets when autodetecting RTP streams
The rtp demuxer which listens for RTP packets and detects the RTP payload type will currently get confused if the first packet received is an RTCP packet. Thus ignore such packets. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 1fb7b2bcda..f8611deed2 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1927,6 +1927,9 @@ static int rtp_read_header(AVFormatContext *s)
continue;
}
+ if (recvbuf[1] >= RTCP_SR && recvbuf[1] <= RTCP_APP)
+ continue;
+
payload_type = recvbuf[1] & 0x7f;
break;
}