summaryrefslogtreecommitdiff
path: root/libavcodec/utvideoenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-13 01:03:54 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-13 01:22:43 +0100
commit7b41cbac7fc03cfc4714049fbe849cb3f96ffaa5 (patch)
tree0c778ad61ce4809b1a404374a96440604a6bc8fd /libavcodec/utvideoenc.c
parentaf68bd1c06ff9ea7379a95d39d5fde5fa1938cd3 (diff)
downloadffmpeg-7b41cbac7fc03cfc4714049fbe849cb3f96ffaa5.tar.gz
avcodec/huffman: extend ff_huff_gen_len_table() to allow >8bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utvideoenc.c')
-rw-r--r--libavcodec/utvideoenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c
index e5a858d5ae..f6e4e7e358 100644
--- a/libavcodec/utvideoenc.c
+++ b/libavcodec/utvideoenc.c
@@ -363,6 +363,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
uint32_t offset = 0, slice_len = 0;
int i, sstart, send = 0;
int symbol;
+ int ret;
/* Do prediction / make planes */
switch (c->frame_pred) {
@@ -429,7 +430,8 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
}
/* Calculate huffman lengths */
- ff_huff_gen_len_table(lengths, counts);
+ if ((ret = ff_huff_gen_len_table(lengths, counts, 256)) < 0)
+ return ret;
/*
* Write the plane's header into the output packet: