diff options
Diffstat (limited to 'libavcodec/flashsvenc.c')
-rw-r--r-- | libavcodec/flashsvenc.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 71c81bd2f8..a6d7caa97b 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -3,20 +3,20 @@ * Copyright (C) 2004 Alex Beregszaszi * Copyright (C) 2006 Benjamin Larsson * - * 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 */ @@ -94,9 +94,9 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx) deflateEnd(&s->zstream); - av_free(s->encbuffer); - av_free(s->previous_frame); - av_free(s->tmpblock); + av_freep(&s->encbuffer); + av_freep(&s->previous_frame); + av_freep(&s->tmpblock); av_frame_free(&avctx->coded_frame); @@ -246,12 +246,8 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, I_frame = 1; } - if ((res = ff_alloc_packet(pkt, s->image_width * s->image_height * 3)) < 0) { - //Conservative upper bound check for compressed data - av_log(avctx, AV_LOG_ERROR, "Error getting output packet of size %d.\n", - s->image_width * s->image_height * 3); + if ((res = ff_alloc_packet2(avctx, pkt, s->image_width * s->image_height * 3)) < 0) return res; - } pkt->size = encode_bitstream(s, p, pkt->data, pkt->size, opt_w * 16, opt_h * 16, pfptr, &I_frame); |