From 1541e97afed51ab6e9f5271d15e52a6322150d28 Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Sat, 10 Sep 2005 18:46:38 +0000
Subject: [PATCH] Make sure RTP timestamps are accurate on playback

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 formats/format_h263.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/formats/format_h263.c b/formats/format_h263.c
index b98ed19e33..a8b75b71b4 100755
--- a/formats/format_h263.c
+++ b/formats/format_h263.c
@@ -158,8 +158,11 @@ static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext)
 	s->fr.samples = s->lastts;
 	s->fr.datalen = len;
 	s->fr.subclass |= mark;
+	s->fr.delivery.tv_sec = 0;
+	s->fr.delivery.tv_usec = 0;
 	if ((res = read(s->fd, &ts, sizeof(ts))) == sizeof(ts)) {
-		s->lastts = *whennext = ntohl(ts) * 4/45;
+		s->lastts = ntohl(ts);
+		*whennext = s->lastts * 4/45;
 	} else
 		*whennext = 0;
 	return &s->fr;
-- 
GitLab