mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
alsdec: propagate error codes in read_block()
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0213d5ad86
commit
1818a1130d
@ -970,15 +970,16 @@ static int decode_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
|
|||||||
static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
|
static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
|
||||||
{
|
{
|
||||||
GetBitContext *gb = &ctx->gb;
|
GetBitContext *gb = &ctx->gb;
|
||||||
|
int ret;
|
||||||
|
|
||||||
*bd->shift_lsbs = 0;
|
*bd->shift_lsbs = 0;
|
||||||
// read block type flag and read the samples accordingly
|
// read block type flag and read the samples accordingly
|
||||||
if (get_bits1(gb)) {
|
if (get_bits1(gb)) {
|
||||||
if (read_var_block_data(ctx, bd) < 0)
|
if ((ret = read_var_block_data(ctx, bd)) < 0)
|
||||||
return -1;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
if (read_const_block_data(ctx, bd) < 0)
|
if ((ret = read_const_block_data(ctx, bd)) < 0)
|
||||||
return -1;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user