[SCM] libav/experimental: rtpdec: Skip padding bytes at the end of packets

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:19:46 UTC 2013


The following commit has been merged in the experimental branch:
commit 4838cdab21e1f7d0f43d2a1649646ff068b4bb1e
Author: Martin Storsjö <martin at martin.st>
Date:   Mon Dec 6 12:43:38 2010 +0000

    rtpdec: Skip padding bytes at the end of packets
    
    Originally committed as revision 25896 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index c9cf855..638fbdd 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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list