[vlc-devel] commit: Revert "RTP: compute deadline for reordering from the current time" ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Oct 14 21:05:47 CEST 2009
vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct 14 21:59:35 2009 +0300| [af7f57911b20990a6d1423fda5f39f8eb6674da0] | committer: Rémi Denis-Courmont
Revert "RTP: compute deadline for reordering from the current time"
This reverts commit 474ef3f0c956b2a4acc0511bd81204fad0987d5b.
This broke RTP caching completely in 1.0.2.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=af7f57911b20990a6d1423fda5f39f8eb6674da0
---
modules/access/rtp/session.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c
index b267015..1d61cf5 100644
--- a/modules/access/rtp/session.c
+++ b/modules/access/rtp/session.c
@@ -146,7 +146,7 @@ struct rtp_source_t
uint16_t last_seq; /* sequence of the next dequeued packet */
block_t *blocks; /* re-ordered blocks queue */
- mtime_t ref_ts; /* reference timestamp for reordering */
+ mtime_t last_dq; /* last dequeued (decoded) packet local timestamp */
void *opaque[0]; /* Per-source private payload data */
};
@@ -316,6 +316,7 @@ rtp_queue (demux_t *demux, rtp_session_t *session, block_t *block)
}
}
src->last_rx = now;
+ block->i_pts = now;
src->last_ts = rtp_timestamp (block);
/* Check sequence number */
@@ -412,8 +413,8 @@ rtp_decode (demux_t *demux, const rtp_session_t *session, rtp_source_t *src)
/* FIXME: handle timestamp wrap properly */
/* TODO: inter-medias/sessions sync (using RTCP-SR) */
const uint32_t timestamp = rtp_timestamp (block);
- src->ref_ts = 0;
- block->i_pts = CLOCK_FREQ * timestamp / pt->frequency;
+ src->last_dq = block->i_pts;
+ block->i_pts = UINT64_C(1) * CLOCK_FREQ * timestamp / pt->frequency;
/* CSRC count */
size_t skip = 12u + (block->p_buffer[0] & 0x0F) * 4;
@@ -490,10 +491,8 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session,
* match for random gaussian jitter). Additionnaly, we implicitly
* wait for misordering times the packetization time.
*/
- mtime_t deadline = src->ref_ts;
+ mtime_t deadline = src->last_dq;
const rtp_pt_t *pt = rtp_find_ptype (session, src, block, NULL);
- if (!deadline)
- deadline = src->ref_ts = now;
if (pt)
deadline += UINT64_C(3) * CLOCK_FREQ * src->jitter
/ pt->frequency;
More information about the vlc-devel
mailing list