Browse Source

trap divide error crash fix

pull/1015/head
root 6 years ago
parent
commit
5179de7db1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      daemon/jitter_buffer.c

+ 1
- 1
daemon/jitter_buffer.c View File

@ -191,7 +191,7 @@ static int handle_clock_drift(struct media_packet *mp) {
struct jitter_buffer *jb = mp->stream->jb; struct jitter_buffer *jb = mp->stream->jb;
int seq_diff = ntohs(mp->rtp->seq_num) - jb->first_seq; int seq_diff = ntohs(mp->rtp->seq_num) - jb->first_seq;
if((seq_diff % CLOCK_DRIFT_MULT) != 0)
if(((seq_diff % CLOCK_DRIFT_MULT) != 0) || !seq_diff)
return 0; return 0;
unsigned long ts = ntohl(mp->rtp->timestamp); unsigned long ts = ntohl(mp->rtp->timestamp);


Loading…
Cancel
Save