diff mbox series

[FFmpeg-devel,22/36] avcodec/h264_mp4toannexb_bsf: Improve returned error code

Message ID 20200530160541.29517-22-andreas.rheinhardt@gmail.com
State New
Headers show
Series [FFmpeg-devel,01/36] avcodec/vp9_superframe_bsf: Check for existence of data before reading it | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt May 30, 2020, 4:05 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/h264_mp4toannexb_bsf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index 2822644b10..91cabcf170 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -270,7 +270,7 @@  static int h264_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *opkt)
 
         if (!j) {
             if (out_size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
-                ret = AVERROR_INVALIDDATA;
+                ret = AVERROR(ERANGE);
                 goto fail;
             }
             ret = av_new_packet(opkt, out_size);