changeset 9422:997f587c3db8 libavcodec

Fix wrong size computation for buffer. Patch is part of netgem's changeset.
author reynaldo
date Sun, 12 Apr 2009 21:48:43 +0000
parents dd2b5e52336a
children b3be9818cf2f
files dvbsubdec.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dvbsubdec.c	Sun Apr 12 21:45:26 2009 +0000
+++ b/dvbsubdec.c	Sun Apr 12 21:48:43 2009 +0000
@@ -439,9 +439,9 @@
     int run_length;
     int pixels_read = 0;
 
-    init_get_bits(&gb, *srcbuf, buf_size << 8);
+    init_get_bits(&gb, *srcbuf, buf_size << 3);
 
-    while (get_bits_count(&gb) < (buf_size << 8) && pixels_read < dbuf_len) {
+    while (get_bits_count(&gb) < buf_size << 3 && pixels_read < dbuf_len) {
         bits = get_bits(&gb, 2);
 
         if (bits) {
@@ -544,9 +544,9 @@
     int run_length;
     int pixels_read = 0;
 
-    init_get_bits(&gb, *srcbuf, buf_size << 8);
+    init_get_bits(&gb, *srcbuf, buf_size << 3);
 
-    while (get_bits_count(&gb) < (buf_size << 8) && pixels_read < dbuf_len) {
+    while (get_bits_count(&gb) < buf_size << 3 && pixels_read < dbuf_len) {
         bits = get_bits(&gb, 4);
 
         if (bits) {