From 298a587f447fbc9103f66a50b8433aab977afc9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 16 Feb 2012 17:31:03 +0100 Subject: rtp: Factorize the check for distinguishing RTCP packets from RTP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The binary doesn't change after this patch. Signed-off-by: Martin Storsjö --- libavformat/rtspenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/rtspenc.c') diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c index 86621cf19d..6c14fe6c2b 100644 --- a/libavformat/rtspenc.c +++ b/libavformat/rtspenc.c @@ -159,7 +159,7 @@ static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st) size -= 4; if (packet_len > size || packet_len < 2) break; - if (ptr[1] >= RTCP_SR && ptr[1] <= RTCP_APP) + if (RTP_PT_IS_RTCP(ptr[1])) id = rtsp_st->interleaved_max; /* RTCP */ else id = rtsp_st->interleaved_min; /* RTP */ -- cgit v1.2.1