diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-06 23:48:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-06 23:48:48 +0100 |
commit | 61904467458b16cf89530e2d0875f3786001dc11 (patch) | |
tree | b87f0d285f00a0f580246dbc0c915d678e1cda49 /libavcodec/aura.c | |
parent | a2aeaff40f34cb54bef55240f9cb8046385087d7 (diff) | |
parent | e83c1e2d0bedb5d4fa9ab351126b2ecc552f1355 (diff) | |
download | ffmpeg-61904467458b16cf89530e2d0875f3786001dc11.tar.gz |
Merge commit 'e83c1e2d0bedb5d4fa9ab351126b2ecc552f1355'
* commit 'e83c1e2d0bedb5d4fa9ab351126b2ecc552f1355':
avs: return meaningful error codes.
aura: return meaningful error codes.
asvdec: return meaningful error codes.
ansi: return a meaningful error code
anm: return meaningful error codes
aasc: return meaningful error codes.
8bps: return meaningful error codes.
4xm: operate with pointers to AVFrames instead of whole structs.
4xm: eliminate a pointless indirection
Conflicts:
libavcodec/4xm.c
libavcodec/aasc.c
libavcodec/anm.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aura.c')
-rw-r--r-- | libavcodec/aura.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/aura.c b/libavcodec/aura.c index cd4e42b609..c591f2f6db 100644 --- a/libavcodec/aura.c +++ b/libavcodec/aura.c @@ -39,7 +39,7 @@ static av_cold int aura_decode_init(AVCodecContext *avctx) s->avctx = avctx; /* width needs to be divisible by 4 for this codec to work */ if (avctx->width & 0x3) - return -1; + return AVERROR(EINVAL); avctx->pix_fmt = AV_PIX_FMT_YUV422P; avcodec_get_frame_defaults(&s->frame); @@ -53,7 +53,7 @@ static int aura_decode_frame(AVCodecContext *avctx, AuraDecodeContext *s = avctx->priv_data; uint8_t *Y, *U, *V; uint8_t val; - int x, y; + int x, y, ret; const uint8_t *buf = pkt->data; /* prediction error tables (make it clear that they are signed values) */ @@ -62,7 +62,7 @@ static int aura_decode_frame(AVCodecContext *avctx, if (pkt->size != 48 + avctx->height * avctx->width) { av_log(avctx, AV_LOG_ERROR, "got a buffer with %d bytes when %d were expected\n", pkt->size, 48 + avctx->height * avctx->width); - return -1; + return AVERROR_INVALIDDATA; } /* pixel data starts 48 bytes in, after 3x16-byte tables */ @@ -73,9 +73,9 @@ static int aura_decode_frame(AVCodecContext *avctx, s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; s->frame.reference = 0; - if (ff_get_buffer(avctx, &s->frame) < 0) { + if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - return -1; + return ret; } Y = s->frame.data[0]; |