Browse Source

avformat/flvdec: Use appropriate error code

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Zhao Zhili 1 day ago
parent
commit
0f7d77fc42
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libavformat/flvdec.c

+ 1 - 1
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);