diff options
author | Martin Storsjö | 2012-02-16 17:31:03 +0100 |
---|---|---|
committer | Martin Storsjö | 2012-02-16 17:45:33 +0100 |
commit | 298a587f447fbc9103f66a50b8433aab977afc9b (patch) | |
tree | 3459d7d1ead32738239ea93c9c000ab25845bcad /libavformat/rtspenc.c | |
parent | c6643fddba73560f26f90d327c84d8832222a720 (diff) |
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>
Diffstat (limited to 'libavformat/rtspenc.c')
-rw-r--r-- | libavformat/rtspenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |