summaryrefslogtreecommitdiff
path: root/libavcodec/vqavideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-07 01:24:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-07 01:24:32 +0100
commit501db2f32babff8e2851ffd7aeb6bcb1ecb47d19 (patch)
treea911a0ca4813975ecc9baae4182b3fea8ef45944 /libavcodec/vqavideo.c
parent4b20d307b32b3562b7cd595cd00dae30203a51fc (diff)
parent9dbbda235d93d628777b986e502213f1ed390973 (diff)
Merge commit '9dbbda235d93d628777b986e502213f1ed390973'
* commit '9dbbda235d93d628777b986e502213f1ed390973': vb: return meaningful error codes. ptx: return meaningful error codes. tiff: return meaningful error codes. vqavideo: return meaningful error codes. mss2: return meaningful error codes. v210dec: return meaningful error codes indeo2: cosmetics, reformat Conflicts: libavcodec/indeo2.c libavcodec/tiff.c libavcodec/v210dec.c libavcodec/vb.c libavcodec/vqavideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vqavideo.c')
-rw-r--r--libavcodec/vqavideo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 19b8639c59..7075199e43 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -122,7 +122,7 @@ typedef struct VqaContext {
static av_cold int vqa_decode_init(AVCodecContext *avctx)
{
VqaContext *s = avctx->priv_data;
- int i, j, codebook_index;
+ int i, j, codebook_index, ret;
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
@@ -130,7 +130,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
/* make sure the extradata made it */
if (s->avctx->extradata_size != VQA_HEADER_SIZE) {
av_log(s->avctx, AV_LOG_ERROR, "expected extradata size of %d\n", VQA_HEADER_SIZE);
- return AVERROR_INVALIDDATA;
+ return AVERROR(EINVAL);
}
/* load up the VQA parameters from the header */
@@ -141,9 +141,9 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
}
s->width = AV_RL16(&s->avctx->extradata[6]);
s->height = AV_RL16(&s->avctx->extradata[8]);
- if(av_image_check_size(s->width, s->height, 0, avctx)){
+ if ((ret = av_image_check_size(s->width, s->height, 0, avctx)) < 0) {
s->width= s->height= 0;
- return AVERROR_INVALIDDATA;
+ return ret;
}
s->vector_width = s->avctx->extradata[10];
s->vector_height = s->avctx->extradata[11];
@@ -592,7 +592,7 @@ static int vqa_decode_frame(AVCodecContext *avctx,
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- if ((res = ff_get_buffer(avctx, &s->frame))) {
+ if ((res = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}