aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aasc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-06 23:48:48 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-06 23:48:48 +0100
commit61904467458b16cf89530e2d0875f3786001dc11 (patch)
treeb87f0d285f00a0f580246dbc0c915d678e1cda49 /libavcodec/aasc.c
parenta2aeaff40f34cb54bef55240f9cb8046385087d7 (diff)
parente83c1e2d0bedb5d4fa9ab351126b2ecc552f1355 (diff)
downloadffmpeg-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/aasc.c')
-rw-r--r--libavcodec/aasc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c
index 0d4704fc3e..0861faee46 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -81,7 +81,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AascContext *s = avctx->priv_data;
- int compr, i, stride, psize;
+ int compr, i, stride, psize, ret;
if (buf_size < 4) {
av_log(avctx, AV_LOG_ERROR, "frame too short\n");
@@ -90,9 +90,9 @@ static int aasc_decode_frame(AVCodecContext *avctx,
s->frame.reference = 3;
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
- if (avctx->reget_buffer(avctx, &s->frame)) {
+ if ((ret = avctx->reget_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
- return -1;
+ return ret;
}
compr = AV_RL32(buf);
@@ -124,7 +124,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
break;
default:
av_log(avctx, AV_LOG_ERROR, "Unknown compression type %d\n", compr);
- return -1;
+ return AVERROR_INVALIDDATA;
}
break;
default: