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;
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;