aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-19 18:20:28 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-19 18:20:28 +0000
commit98a5b1f43cc0dc34af5d3a5859ff7cd20058759b (patch)
tree0b7d59489c76c6a088cc2fd219b72e235789cf56
parentcbcfb964e8297f231e4424f52e0b376e6acdf6c6 (diff)
Make sure that the mark bit does not incorrectly cause video frame timestamps to be calculated as if they are audio frames.
(closes issue #11429) Reported by: sperreault Patches: 11429-frametype.diff uploaded by qwell (license 4) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110019 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/rtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/rtp.c b/main/rtp.c
index fc6f9a467..6cb7fb6ba 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2620,7 +2620,7 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
ms = calc_txstamp(rtp, &f->delivery);
/* Default prediction */
- if (f->subclass < AST_FORMAT_MAX_AUDIO) {
+ if (f->frametype == AST_FRAME_VOICE) {
pred = rtp->lastts + f->samples;
/* Re-calculate last TS */
@@ -2636,7 +2636,7 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
mark = 1;
}
}
- } else {
+ } else if (f->frametype == AST_FRAME_VIDEO) {
mark = f->subclass & 0x1;
pred = rtp->lastovidtimestamp + f->samples;
/* Re-calculate last TS */