[FFmpeg-cvslog] lavc/assenc: return more meaningful error code

John Stebbins git at videolan.org
Sat Apr 11 02:53:50 EEST 2020


ffmpeg | branch: master | John Stebbins <jstebbins at jetheaddev.com> | Fri Apr 10 12:15:26 2020 -0600| [9a0817baa4bfba301cfd056bfe7260987751fa13] | committer: Philip Langdale

lavc/assenc: return more meaningful error code

When the buffer is too small, return AVERROR_BUFFER_TOO_SMALL

Signed-off-by: Philip Langdale <philipl at overt.org>

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

 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;



More information about the ffmpeg-cvslog mailing list