changeset 1912:351e996f29d9 libavcodec

fixing alignment, 2nd try
author michael
date Mon, 29 Mar 2004 00:29:27 +0000
parents 5b379ba0a577
children 486236d25f89
files h263.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h263.c	Sun Mar 28 23:10:53 2004 +0000
+++ b/h263.c	Mon Mar 29 00:29:27 2004 +0000
@@ -2996,8 +2996,8 @@
     uint8_t *start= pbBufPtr(&s->pb);
     uint8_t *end= s->pb.buf_end;
     int size= end - start;
-    int pb_size = (size/3)&(~1);
-    int tex_size= size - 2*pb_size;
+    int pb_size = (((int)start + size/3)&(~3)) - (int)start;
+    int tex_size= (size - 2*pb_size)&(~3);
     
     set_put_bits_buffer_size(&s->pb, pb_size);
     init_put_bits(&s->tex_pb, start + pb_size           , tex_size);