Message ID | 20892390d0a34a97fd61a05bb4797ac648fd586c.1652120184.git.ffmpegagent@gmail.com |
---|---|
State | Accepted |
Commit | 686b64e15526fbc1410104212aa291b66b0f488e |
Headers | show |
Series | lavc/videotoolboxdec: improve HEVC stream compatibility | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 7c4c4c6e1b..a1933f03f2 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -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]; }