Commit ab35a94e authored by rbultje's avatar rbultje

Change status packet skipping to be more spec-compliant. See discussion in

"[PATCH] RDT/Realmedia patches #2" thread on ML.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15836 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 06022a26
......@@ -178,10 +178,17 @@ ff_rdt_parse_header(const uint8_t *buf, int len,
{
int consumed = 10;
if (len > 0 && (buf[0] < 0x40 || buf[0] > 0x42)) {
buf += 9;
len -= 9;
consumed += 9;
/* skip status packets */
while (len >= 5 && buf[1] == 0xFF /* status packet */) {
int pkt_len;
if (!(buf[0] & 0x80))
return -1; /* not followed by a data packet */
pkt_len = AV_RB16(buf+3);
buf += pkt_len;
len -= pkt_len;
consumed += pkt_len;
}
if (len < 10)
return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment