[FFmpeg-cvslog] Fixed size given to init_get_bits() in ffv1 decoder.
Laurent Aimar
git at videolan.org
Wed Sep 21 21:08:31 CEST 2011
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Fri Sep 9 22:04:09 2011 +0200| [bac822025e6d73d0932ac1a18e80658be186ccf9] | committer: 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: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 8362a0ffed0b15a9977fcde947bcb49dfc06638b)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bac822025e6d73d0932ac1a18e80658be186ccf9
---
libavcodec/ffv1.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index a0a4a1d..8fe725f 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1805,7 +1805,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
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
//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 {
bytes_read = 0; /* avoid warning */
}
@@ -1822,7 +1822,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
if(fs->ac){
ff_init_range_decoder(&fs->c, buf_p, v);
}else{
- init_get_bits(&fs->gb, buf_p, v);
+ init_get_bits(&fs->gb, buf_p, v * 8);
}
}
More information about the ffmpeg-cvslog
mailing list