summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-12-06 12:43:38 +0000
committerMartin Storsjö <martin@martin.st>2010-12-06 12:43:38 +0000
commit4838cdab21e1f7d0f43d2a1649646ff068b4bb1e (patch)
treeae4501318314ec19a36957b5405547fc5738f131 /libavformat
parent90f1f3bf0010e9a157df775e188811fe37c6b371 (diff)
rtpdec: Skip padding bytes at the end of packets
Originally committed as revision 25896 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtpdec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index c9cf855a59..638fbdd119 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -475,6 +475,12 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt,
return -1;
}
+ if (buf[0] & 0x20) {
+ int padding = buf[len - 1];
+ if (len >= 12 + padding)
+ len -= padding;
+ }
+
s->seq = seq;
len -= 12;
buf += 12;