Browse Source

avcodec/4xm: Fix returned error codes

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.2
Michael Niedermayer 6 years ago
parent
commit
07607a1db8
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/4xm.c

+ 2
- 2
libavcodec/4xm.c View File

@@ -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);


Loading…
Cancel
Save