summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorThilo Borgmann <thilo.borgmann@googlemail.com>2012-03-27 18:06:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-27 18:06:54 +0200
commit7ea948bac31d9d15627466a73a07e96eb6049939 (patch)
tree6aad4c93425834cd63386d714be89a83f825fb4b /libavcodec
parent28a613b09b712494b8a82d00112d4e6e97a0df0a (diff)
alsdec: check return values.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/alsdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index f441bd01ca..e61c29e180 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1381,8 +1381,7 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
bd.raw_samples = ctx->raw_samples[c] + offset;
bd.raw_other = NULL;
- read_block(ctx, &bd);
- if (read_channel_data(ctx, ctx->chan_data[c], c))
+ if (read_block(ctx, &bd) || read_channel_data(ctx, ctx->chan_data[c], c))
return -1;
}
@@ -1402,7 +1401,8 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
bd.lpc_cof = ctx->lpc_cof[c];
bd.quant_cof = ctx->quant_cof[c];
bd.raw_samples = ctx->raw_samples[c] + offset;
- decode_block(ctx, &bd);
+ if (decode_block(ctx, &bd))
+ return -1;
}
memset(reverted_channels, 0, avctx->channels * sizeof(*reverted_channels));