]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res/res_rtp_asterisk.c: Fix incorrect assignment of frame->subclass.frame_ending 88/1388/3
authorStefanEng86 <stefanen@kth.se>
Tue, 6 Oct 2015 16:05:00 +0000 (18:05 +0200)
committerStefanEng86 <stefanen@kth.se>
Wed, 7 Oct 2015 13:49:33 +0000 (15:49 +0200)
In ast_rtp_read, the value of the variable 'mark' which we try to assign to a
frame->subclass.frame_ending may be 0, 1 or (1<<23), but we should translate
it to 0 or 1.

ASTERISK-25451 #close
Change-Id: I53bdf5c026041730184a6a809009c028549ce626

res/res_rtp_asterisk.c

index 2e285ebefc25d8588737873e84a008b0e3409b3c..b4a472f8a0b4e0936e1f0ea1511c4a05570c7415 100644 (file)
@@ -4702,7 +4702,7 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
                rtp->f.delivery.tv_sec = 0;
                rtp->f.delivery.tv_usec = 0;
                /* Pass the RTP marker bit as bit */
-               rtp->f.subclass.frame_ending = mark;
+               rtp->f.subclass.frame_ending = mark ? 1 : 0;
        } else if (ast_format_get_type(rtp->f.subclass.format) == AST_MEDIA_TYPE_TEXT) {
                /* TEXT -- samples is # of samples vs. 1000 */
                if (!rtp->lastitexttimestamp)