From 298a587f447fbc9103f66a50b8433aab977afc9b Mon Sep 17 00:00:00 2001 From: Martin Storsjö 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/rtpproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/rtpproto.c') diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 03794ae1ce..c93de4af2b 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -266,7 +266,7 @@ static int rtp_write(URLContext *h, const uint8_t *buf, int size) int ret; URLContext *hd; - if (buf[1] >= RTCP_SR && buf[1] <= RTCP_APP) { + if (RTP_PT_IS_RTCP(buf[1])) { /* RTCP payload type */ hd = s->rtcp_hd; } else { -- cgit v1.2.3