changeset 2894:26f8974c3d66 libavcodec

fix some pointer to intger without cast warnings (patch by Michel Bardiaux)
author aurel
date Wed, 21 Sep 2005 23:18:52 +0000
parents 6f8bcb169256
children 8fe1dc88294a
files bitstream.h
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/bitstream.h	Wed Sep 21 23:09:16 2005 +0000
+++ b/bitstream.h	Wed Sep 21 23:18:52 2005 +0000
@@ -53,8 +53,10 @@
 
 static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
 {
-    if(buffer_size < 0)
-        buffer= buffer_size= 0;
+    if(buffer_size < 0) {
+        buffer_size = 0;
+        buffer = NULL;
+    }
 
     s->buf = buffer;
     s->buf_end = s->buf + buffer_size;
@@ -676,8 +678,10 @@
                    const uint8_t *buffer, int bit_size)
 {
     int buffer_size= (bit_size+7)>>3;
-    if(buffer_size < 0 || bit_size < 0)
-        buffer= buffer_size= bit_size= 0;
+    if(buffer_size < 0 || bit_size < 0) {
+        buffer_size = bit_size = 0;
+        buffer = NULL;
+    }
 
     s->buffer= buffer;
     s->size_in_bits= bit_size;