diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 06:07:33 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 16:59:15 +0400 |
commit | 1818a1130def42215ccb607edee9a2f370de6a6c (patch) | |
tree | 6da8f5b3ff6bcaca0dadba47f604289783e8ffad | |
parent | 0213d5ad86d7ec26363b10895a96a3701c4e7fa8 (diff) |
alsdec: propagate error codes in read_block()
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/alsdec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index e9774f0301..1f725a1730 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -970,15 +970,16 @@ static int decode_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) static int read_block(ALSDecContext *ctx, ALSBlockData *bd) { GetBitContext *gb = &ctx->gb; + int ret; *bd->shift_lsbs = 0; // read block type flag and read the samples accordingly if (get_bits1(gb)) { - if (read_var_block_data(ctx, bd) < 0) - return -1; + if ((ret = read_var_block_data(ctx, bd)) < 0) + return ret; } else { - if (read_const_block_data(ctx, bd) < 0) - return -1; + if ((ret = read_const_block_data(ctx, bd)) < 0) + return ret; } return 0; |