[FFmpeg-cvslog] alsdec: propagate error codes in read_block()
Michael Niedermayer
git at videolan.org
Thu Dec 13 14:06:20 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec 13 03:07:33 2012 +0100| [1818a1130def42215ccb607edee9a2f370de6a6c] | committer: Michael Niedermayer
alsdec: propagate error codes in read_block()
Reviewed-by: Thilo Borgmann <thilo.borgmann at googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1818a1130def42215ccb607edee9a2f370de6a6c
---
libavcodec/alsdec.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index e9774f0..1f725a1 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;
More information about the ffmpeg-cvslog
mailing list