From 53b2a24f751305534e6afa561442b052d11dd26d Mon Sep 17 00:00:00 2001 From: Bojack Date: Tue, 15 Oct 2024 15:30:58 +0800 Subject: [PATCH] =?UTF-8?q?264=E8=BD=ACannexb=E8=B5=B7=E5=A7=8B=E7=A0=81?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=BA0001?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bojack --- libavcodec/h264_mp4toannexb_bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index cbbbc27ff7..aa45f31c81 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -49,7 +49,7 @@ typedef struct H264BSFContext { static void count_or_copy(uint8_t **out, uint64_t *out_size, const uint8_t *in, int in_size, int ps, int copy) { - uint8_t start_code_size = ps < 0 ? 0 : *out_size == 0 || ps ? 4 : 3; + uint8_t start_code_size = ps < 0 ? 0 : 4; if (copy) { memcpy(*out + start_code_size, in, in_size);