[FFmpeg-cvslog] avformat/aiffdec: "-1" -> AVERROR_INVALIDDATA

Michael Niedermayer git at videolan.org
Mon Nov 1 21:40:38 EET 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Nov  1 18:37:26 2021 +0100| [2171f97cc88fc5a73409c6785a961f11113f8e9b] | committer: Michael Niedermayer

avformat/aiffdec: "-1" -> AVERROR_INVALIDDATA

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/aiffdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 7a995c00a6..7afadeb085 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -310,7 +310,7 @@ static int aiff_read_header(AVFormatContext *s)
             break;
         case MKTAG('w', 'a', 'v', 'e'):
             if ((uint64_t)size > (1<<30))
-                return -1;
+                return AVERROR_INVALIDDATA;
             if ((ret = ff_get_extradata(s, st->codecpar, pb, size)) < 0)
                 return ret;
             if (   (st->codecpar->codec_id == AV_CODEC_ID_QDMC || st->codecpar->codec_id == AV_CODEC_ID_QDM2)
@@ -372,7 +372,7 @@ got_sound:
         st->codecpar->block_align = 35;
     } else if (st->codecpar->block_align <= 0) {
         av_log(s, AV_LOG_ERROR, "could not find COMM tag or invalid block_align value\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
 
     /* Now positioned, get the sound data start and end */



More information about the ffmpeg-cvslog mailing list