aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-12-31 18:11:44 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-03-24 10:38:51 +0100
commitd43b488340105e09bf378795bd621ebe1520594b (patch)
tree63483fe031b537df1710042237bc47aaaa24d032 /libavcodec/4xm.c
parent8349bcb526ebe0af3c3ec62833e0940c7655e95a (diff)
downloadffmpeg-d43b488340105e09bf378795bd621ebe1520594b.tar.gz
avcodec/4xm: Fix returned error codes
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 07607a1db879d0d96e2c91e1354bc4e425937d3a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 5547dfd87f..8e05a4c366 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -498,7 +498,7 @@ static int decode_i_block(FourXContext *f, int16_t *block)
if (get_bits_left(&f->gb) < 2){
av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb));
- return -1;
+ return AVERROR_INVALIDDATA;
}
/* DC coef */
@@ -732,7 +732,7 @@ static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length)
for (x = 0; x < width; x += 16) {
unsigned int color[4] = { 0 }, bits;
if (buf_end - buf < 8)
- return -1;
+ return AVERROR_INVALIDDATA;
// warning following is purely guessed ...
color[0] = bytestream2_get_le16u(&g3);
color[1] = bytestream2_get_le16u(&g3);