Mercurial > libavformat.hg
diff rtp.c @ 85:25062c9b1f86 libavformat
per context frame_rate_base, this should finally fix frame_rate related av sync issues
| author | michaelni |
|---|---|
| date | Wed, 12 Mar 2003 15:16:19 +0000 |
| parents | a58a8a53eb46 |
| children | 38f64fabb24b |
line wrap: on
line diff
--- a/rtp.c Wed Mar 12 01:35:47 2003 +0000 +++ b/rtp.c Wed Mar 12 15:16:19 2003 +0000 @@ -560,9 +560,8 @@ q += len; /* 90 KHz time stamp */ - /* XXX: overflow */ s->timestamp = s->base_timestamp + - (s->cur_timestamp * 90000LL * FRAME_RATE_BASE) / st->codec.frame_rate; + av_rescale((int64_t)s->cur_timestamp * st->codec.frame_rate_base, 90000, st->codec.frame_rate); rtp_send_data(s1, s->buf, q - s->buf); buf1 += len; @@ -586,9 +585,8 @@ len = size; /* 90 KHz time stamp */ - /* XXX: overflow */ s->timestamp = s->base_timestamp + - (s->cur_timestamp * 90000LL * FRAME_RATE_BASE) / st->codec.frame_rate; + av_rescale((int64_t)s->cur_timestamp * st->codec.frame_rate_base, 90000, st->codec.frame_rate); rtp_send_data(s1, buf1, len); buf1 += len;
