diff options
Diffstat (limited to 'libavcodec/flac_parser.c')
-rw-r--r-- | libavcodec/flac_parser.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 8ce7a23..3d2b882 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -2,20 +2,20 @@ * FLAC parser * Copyright (c) 2010 Michael Chinen * - * 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 */ @@ -561,8 +561,8 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx, } /* Fill the buffer. */ - if (av_fifo_realloc2(fpc->fifo_buf, - (read_end - read_start) + av_fifo_size(fpc->fifo_buf)) < 0) { + if ( av_fifo_space(fpc->fifo_buf) < read_end - read_start + && av_fifo_realloc2(fpc->fifo_buf, (read_end - read_start) + 2*av_fifo_size(fpc->fifo_buf)) < 0) { av_log(avctx, AV_LOG_ERROR, "couldn't reallocate buffer of size %td\n", (read_end - read_start) + av_fifo_size(fpc->fifo_buf)); |