diff options
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r-- | libavcodec/alsdec.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index bdc0be1..84ed4cf 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -2,20 +2,20 @@ * MPEG-4 ALS decoder * Copyright (c) 2009 Thilo Borgmann <thilo.borgmann _at_ googlemail.com> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -394,7 +394,7 @@ static av_cold int read_specific_config(ALSDecContext *ctx) if (get_bits_left(&gb) < 32) return -1; - if (avctx->err_recognition & AV_EF_CRCCHECK) { + if (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL)) { ctx->crc_table = av_crc_get_table(AV_CRC_32_IEEE_LE); ctx->crc = 0xFFFFFFFF; ctx->crc_org = ~get_bits_long(&gb, 32); @@ -1011,8 +1011,8 @@ static void zero_remaining(unsigned int b, unsigned int b_max, { unsigned int count = 0; - for (; b < b_max; b++) - count += div_blocks[b]; + while (b < b_max) + count += div_blocks[b++]; if (count) memset(buf, 0, sizeof(*buf) * count); @@ -1442,7 +1442,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, ctx->cur_frame_length = sconf->frame_length; // decode the frame data - if ((invalid_frame = read_frame_data(ctx, ra_frame) < 0)) + if ((invalid_frame = read_frame_data(ctx, ra_frame)) < 0) av_log(ctx->avctx, AV_LOG_WARNING, "Reading frame data failed. Skipping RA unit.\n"); @@ -1472,7 +1472,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, } // update CRC - if (sconf->crc_enabled && (avctx->err_recognition & AV_EF_CRCCHECK)) { + if (sconf->crc_enabled && (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL))) { int swap = HAVE_BIGENDIAN != sconf->msb_first; if (ctx->avctx->bits_per_raw_sample == 24) { @@ -1712,7 +1712,7 @@ static av_cold int decode_init(AVCodecContext *avctx) // allocate crc buffer if (HAVE_BIGENDIAN != sconf->msb_first && sconf->crc_enabled && - (avctx->err_recognition & AV_EF_CRCCHECK)) { + (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL))) { ctx->crc_buffer = av_malloc(sizeof(*ctx->crc_buffer) * ctx->cur_frame_length * avctx->channels * |