When the buffer is too small, return AVERROR_BUFFER_TOO_SMALL
---
 libavcodec/assenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/assenc.c b/libavcodec/assenc.c
index e54c1d8ec3..a6e1d5d8b9 100644
--- a/libavcodec/assenc.c
+++ b/libavcodec/assenc.c
@@ -93,7 +93,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
 
         if (len > bufsize-total_len-1) {
             av_log(avctx, AV_LOG_ERROR, "Buffer too small for ASS event.\n");
-            return AVERROR(EINVAL);
+            return AVERROR_BUFFER_TOO_SMALL;
         }
 
         total_len += len;
-- 
2.25.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to