mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
dfbc921f9f
commit
686b64e155
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue