diff --git a/main/rtp.c b/main/rtp.c index 4fcf747da9..1647074def 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -3004,7 +3004,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_AUDIO_MASK) { + if (f->frametype == AST_FRAME_VOICE) { pred = rtp->lastts + f->samples; /* Re-calculate last TS */ @@ -3019,7 +3019,7 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec mark = 1; } } - } else if(f->subclass & AST_FORMAT_VIDEO_MASK) { + } else if (f->frametype == AST_FRAME_VIDEO) { mark = f->subclass & 0x1; pred = rtp->lastovidtimestamp + f->samples; /* Re-calculate last TS */