lavc/videotoolboxdec: fix escaping sequential zero sequences

This ensure that e.g. 0000000000 becomes 00000300 000300,
rather than 00000300 0000.

Signed-off-by: rcombs <rcombs@rcombs.me>
This commit is contained in:
rcombs 2022-04-16 02:47:30 -05:00
parent dfbc921f9f
commit 686b64e155
1 changed files with 3 additions and 4 deletions

View File

@ -166,14 +166,13 @@ static int escape_ps(uint8_t* dst, const uint8_t* src, int src_size)
src[i + 2] <= 0x03) {
if (dst) {
*p++ = src[i++];
*p++ = src[i++];
*p++ = src[i];
*p++ = 0x03;
} else {
i += 2;
i++;
}
size++;
}
if (dst)
} else if (dst)
*p++ = src[i];
}