[FFmpeg-cvslog] avformat/flvdec: Use appropriate error code
Zhao Zhili
git at videolan.org
Wed Mar 12 10:19:46 EET 2025
ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Tue Mar 11 10:49:47 2025 +0800| [0f7d77fc423d6721e68dc39b5f62b882d8d6da5f] | committer: Zhao Zhili
avformat/flvdec: Use appropriate error code
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
Reviewed-by: Steven Liu <lingjiujianke at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f7d77fc423d6721e68dc39b5f62b882d8d6da5f
---
libavformat/flvdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index b431dabffc..c51f64a588 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -489,7 +489,7 @@ static int amf_get_string(AVIOContext *ioc, char *buffer, int buffsize)
int length = avio_rb16(ioc);
if (length >= buffsize) {
avio_skip(ioc, length);
- return -1;
+ return AVERROR_INVALIDDATA;
}
ret = avio_read(ioc, buffer, length);
More information about the ffmpeg-cvslog
mailing list