winlin

fix the microsec calc bug for librtmp

@@ -164,8 +164,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -164,8 +164,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
164 { 164 {
165 SrsBlockSyncSocket* skt = (SrsBlockSyncSocket*)ctx; 165 SrsBlockSyncSocket* skt = (SrsBlockSyncSocket*)ctx;
166 166
167 - int sec = timeout_us / (1000 * 1000LL);  
168 - int microsec = timeout_us / 1000LL % 1000; 167 + int sec = (int)(timeout_us / 1000000LL);
  168 + int microsec = (int)(timeout_us % 1000000LL);
169 169
170 sec = srs_max(0, sec); 170 sec = srs_max(0, sec);
171 microsec = srs_max(0, microsec); 171 microsec = srs_max(0, microsec);
@@ -192,8 +192,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -192,8 +192,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
192 { 192 {
193 SrsBlockSyncSocket* skt = (SrsBlockSyncSocket*)ctx; 193 SrsBlockSyncSocket* skt = (SrsBlockSyncSocket*)ctx;
194 194
195 - int sec = timeout_us / (1000 * 1000LL);  
196 - int microsec = timeout_us / 1000LL % 1000; 195 + int sec = (int)(timeout_us / 1000000LL);
  196 + int microsec = (int)(timeout_us % 1000000LL);
197 197
198 sec = srs_max(0, sec); 198 sec = srs_max(0, sec);
199 microsec = srs_max(0, microsec); 199 microsec = srs_max(0, microsec);