summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Zhili <[email protected]>2025-03-11 10:49:47 +0800
committerZhao Zhili <[email protected]>2025-03-12 16:07:20 +0800
commit0f7d77fc423d6721e68dc39b5f62b882d8d6da5f (patch)
tree3b525b5719f604874e5418197156196678a6cc7c
parentfa5a100ed25e4cf0581924cec7b5313b3be0989f (diff)
avformat/flvdec: Use appropriate error code
Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
-rw-r--r--libavformat/flvdec.c2
1 files changed, 1 insertions, 1 deletions
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);