aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aasc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-14 09:11:07 +0100
committerAnton Khirnov <anton@khirnov.net>2013-01-06 13:31:39 +0100
commit18009e60d273eb2e0184926812778e06985bf48e (patch)
tree6d017d34f113602d1615df77fc10d8c9878c5d61 /libavcodec/aasc.c
parent313da47aa1f28aba3a81b0f4c9c23fd29df1070a (diff)
downloadffmpeg-18009e60d273eb2e0184926812778e06985bf48e.tar.gz
aasc: return meaningful error codes.
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 47d25d0d09..7759c71a2f 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -56,13 +56,13 @@ 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;
+ int compr, i, stride, ret;
s->frame.reference = 1;
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);
@@ -82,7 +82,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;
}
*got_frame = 1;