Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-07 02:48:48 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-01-07 02:48:48 +0400
commit61904467458b16cf89530e2d0875f3786001dc11 (patch)
treeb87f0d285f00a0f580246dbc0c915d678e1cda49 /libavcodec/asvdec.c
parenta2aeaff40f34cb54bef55240f9cb8046385087d7 (diff)
parente83c1e2d0bedb5d4fa9ab351126b2ecc552f1355 (diff)
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/asvdec.c')
-rw-r--r--libavcodec/asvdec.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c
index 7c3b30c8db..e4d950400f 100644
--- a/libavcodec/asvdec.c
+++ b/libavcodec/asvdec.c
@@ -108,7 +108,7 @@ static inline int asv1_decode_block(ASV1Context *a, DCTELEM block[64])
break;
if (ccp < 0 || i >= 10) {
av_log(a->avctx, AV_LOG_ERROR, "coded coeff pattern damaged\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (ccp & 8)
@@ -210,15 +210,15 @@ static int decode_frame(AVCodecContext *avctx,
int buf_size = avpkt->size;
AVFrame *picture = data;
AVFrame * const p = &a->picture;
- int mb_x, mb_y;
+ int mb_x, mb_y, ret;
if (p->data[0])
avctx->release_buffer(avctx, p);
p->reference = 0;
- if (ff_get_buffer(avctx, p) < 0) {
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
- return -1;
+ return ret;
}
p->pict_type = AV_PICTURE_TYPE_I;
p->key_frame = 1;
@@ -240,8 +240,8 @@ static int decode_frame(AVCodecContext *avctx,
for (mb_y = 0; mb_y < a->mb_height2; mb_y++) {
for (mb_x = 0; mb_x < a->mb_width2; mb_x++) {
- if (decode_mb(a, a->block) < 0)
- return -1;
+ if ((ret = decode_mb(a, a->block)) < 0)
+ return ret;
idct_put(a, mb_x, mb_y);
}
@@ -250,8 +250,8 @@ static int decode_frame(AVCodecContext *avctx,
if (a->mb_width2 != a->mb_width) {
mb_x = a->mb_width2;
for (mb_y = 0; mb_y < a->mb_height2; mb_y++) {
- if (decode_mb(a, a->block) < 0)
- return -1;
+ if ((ret = decode_mb(a, a->block)) < 0)
+ return ret;
idct_put(a, mb_x, mb_y);
}
@@ -260,8 +260,8 @@ static int decode_frame(AVCodecContext *avctx,
if (a->mb_height2 != a->mb_height) {
mb_y = a->mb_height2;
for (mb_x = 0; mb_x < a->mb_width; mb_x++) {
- if (decode_mb(a, a->block) < 0)
- return -1;
+ if ((ret = decode_mb(a, a->block)) < 0)
+ return ret;
idct_put(a, mb_x, mb_y);
}