[FFmpeg-cvslog] avcodec/h264_parse: Fix error code in decode_extradata

Zhao Zhili git at videolan.org
Mon Apr 1 12:11:12 EEST 2024


ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Tue Mar 26 10:59:00 2024 +0800| [7bf85d2d3a3e3d5cced7fcf16b8af6aaaabd289b] | committer: Zhao Zhili

avcodec/h264_parse: Fix error code in decode_extradata

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7bf85d2d3a3e3d5cced7fcf16b8af6aaaabd289b
---

 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;



More information about the ffmpeg-cvslog mailing list