[FFmpeg-devel] [PATCH 1/2] rtpdec: Skip padding bytes at the end of packets

Luca Barbato lu_zero
Mon Dec 6 13:30:24 CET 2010


Looks fine

On 12/6/10 12:55 PM, Martin Storsjo wrote:
> ---
>   libavformat/rtpdec.c |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)
>
> 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;




More information about the ffmpeg-devel mailing list