Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix header ext data length calculation in rtpdec.c #1

Open
wants to merge 2 commits into
base: release-2.4.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libavformat/rtpdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,9 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt,
/* calculate the header extension length (stored as number
* of 32-bit words) */
extlen = (AV_RB16(buf + 2) + 1) << 2;
/* should also take the four-octet extension header into
* account */
extlen += 4;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonykwok Hello. Thank you very much for your attention and your PR. I am not sure but hasn't four-octet extension header already been applied above?:

len   -= 4 * csrc;
buf   += 4 * csrc;

or would you like to have it as a part of extension data?


if (len < extlen)
return -1;
Expand Down