Commit 8362a0ff authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

Fixed size given to init_get_bits() in ffv1 decoder.

init_get_bits() takes a number of bits and not a number of bytes as
its size argument.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 22bf6f70
...@@ -1733,7 +1733,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac ...@@ -1733,7 +1733,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
bytes_read = c->bytestream - c->bytestream_start - 1; bytes_read = c->bytestream - c->bytestream_start - 1;
if(bytes_read ==0) av_log(avctx, AV_LOG_ERROR, "error at end of AC stream\n"); //FIXME if(bytes_read ==0) av_log(avctx, AV_LOG_ERROR, "error at end of AC stream\n"); //FIXME
//printf("pos=%d\n", bytes_read); //printf("pos=%d\n", bytes_read);
init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, buf_size - bytes_read); init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, (buf_size - bytes_read) * 8);
} else { } else {
bytes_read = 0; /* avoid warning */ bytes_read = 0; /* avoid warning */
} }
...@@ -1750,7 +1750,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac ...@@ -1750,7 +1750,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
if(fs->ac){ if(fs->ac){
ff_init_range_decoder(&fs->c, buf_p, v); ff_init_range_decoder(&fs->c, buf_p, v);
}else{ }else{
init_get_bits(&fs->gb, buf_p, v); init_get_bits(&fs->gb, buf_p, v * 8);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment