From 7bf85d2d3a3e3d5cced7fcf16b8af6aaaabd289b Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Tue, 26 Mar 2024 10:59:00 +0800 Subject: [PATCH] avcodec/h264_parse: Fix error code in decode_extradata Signed-off-by: Zhao Zhili --- 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 c58d0c0fa9..c13bc860ef 100644 --- a/libavcodec/h264_parse.c +++ b/libavcodec/h264_parse.c @@ -469,7 +469,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;