diff options
Diffstat (limited to 'libavcodec/utvideodec.c')
-rw-r--r-- | libavcodec/utvideodec.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 7d75c59336..afd56ea1bd 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -2,20 +2,20 @@ * Ut Video decoder * Copyright (c) 2011 Konstantin Shishkov * - * 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 */ @@ -71,7 +71,7 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym) code += 0x80000000u >> (he[i].len - 1); } - return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 9), last + 1, + return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 11), last + 1, bits, sizeof(*bits), sizeof(*bits), codes, sizeof(*codes), sizeof(*codes), syms, sizeof(*syms), sizeof(*syms), 0); @@ -156,7 +156,7 @@ static int decode_plane(UtvideoContext *c, int plane_no, "Slice decoding ran out of bits\n"); goto fail; } - pix = get_vlc2(&gb, vlc.table, vlc.bits, 4); + pix = get_vlc2(&gb, vlc.table, vlc.bits, 3); if (pix < 0) { av_log(c->avctx, AV_LOG_ERROR, "Decoding error\n"); goto fail; @@ -335,12 +335,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, GetByteContext gb; ThreadFrame frame = { .f = data }; - if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0) { - av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0) return ret; - } - - ff_thread_finish_setup(avctx); /* parse plane structure to get frame flags and validate slice offsets */ bytestream2_init(&gb, buf, buf_size); |