summaryrefslogtreecommitdiff
path: root/libavformat/rtpproto.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-12-09 16:05:14 +0200
committerMartin Storsjö <martin@martin.st>2014-12-09 23:59:14 +0200
commit95d880fa6436f3b557a9c060428a04b9e4d552df (patch)
treee1e3becbd7f7bd20ba47f3d33d9d76d10460a693 /libavformat/rtpproto.c
parentd2f1d42b18787e4fcb28864d9d9f701dd64a5747 (diff)
rtpproto: Fix the input RTP data format check
Only the upper 2 bits of the first byte are known to be a fixed value. The lower bits in the first byte of a RTP packet could be set if the input is from another RTP packetizers than libavformat's, but for RTCP packets, they would also be set when sending RTCP RR packets, triggering false warnings about incorrect input format to the protocol. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpproto.c')
-rw-r--r--libavformat/rtpproto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index 1171fc2f14..5bff00ed7a 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -411,7 +411,7 @@ static int rtp_write(URLContext *h, const uint8_t *buf, int size)
if (size < 2)
return AVERROR(EINVAL);
- if (buf[0] != (RTP_VERSION << 6))
+ if ((buf[0] & 0xc0) != (RTP_VERSION << 6))
av_log(h, AV_LOG_WARNING, "Data doesn't look like RTP packets, "
"make sure the RTP muxer is used\n");