rtp: Factorize the check for distinguishing RTCP packets from RTP

The binary doesn't change after this patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2012-02-16 17:31:03 +01:00
parent c6643fddba
commit 298a587f44
6 changed files with 7 additions and 5 deletions

View File

@@ -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 {