[FFmpeg-devel] [PATCH] avcodec/h264_parse: Fix error code in decode_extradata
Zhao Zhili
quinkblack at foxmail.com
Tue Mar 26 04:59:00 EET 2024
From: Zhao Zhili <zhilizhao at tencent.com>
---
libavcodec/h264_parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
index 3378650fd5..09d3b9dc05 100644
--- a/libavcodec/h264_parse.c
+++ b/libavcodec/h264_parse.c
@@ -468,7 +468,7 @@ int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps,
int ret;
if (!data || size <= 0)
- return -1;
+ return AVERROR(EINVAL);
if (data[0] == 1) {
int i, cnt, nalsize;
--
2.25.1
More information about the ffmpeg-devel
mailing list