]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make sure that the mark bit does not incorrectly cause video frame timestamps to...
authorJoshua Colp <jcolp@digium.com>
Wed, 19 Mar 2008 18:20:28 +0000 (18:20 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 19 Mar 2008 18:20:28 +0000 (18:20 +0000)
(closes issue #11429)
Reported by: sperreault
Patches:
      11429-frametype.diff uploaded by qwell (license 4)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@110019 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index fc6f9a467e8c99ddf3a295cd07786d2e17c1e64f..6cb7fb6bafca9616038ea20318099583dbc71b75 100644 (file)
@@ -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 */