avcodec/put_bits: Assert buf_ptr in flush_put_bits()