]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a bug caused by a partially invalid frame (from the jitterbuffer) passing through...
authorJoshua Colp <jcolp@digium.com>
Fri, 6 Nov 2009 16:41:20 +0000 (16:41 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 6 Nov 2009 16:41:20 +0000 (16:41 +0000)
(closes issue #15560)
Reported by: jvandal
(closes issue #15709)
Reported by: covici

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

main/abstract_jb.c

index 226df462bac2532a4d0c2b1bc25db689eee4460b..ecc5e8cde44f200ea8b9ce5c6848a28aee9144ce 100644 (file)
@@ -389,7 +389,7 @@ static void jb_get_and_deliver(struct ast_channel *chan)
        struct ast_jb *jb = &chan->jb;
        struct ast_jb_impl *jbimpl = jb->impl;
        void *jbobj = jb->jbobj;
-       struct ast_frame *f, finterp;
+       struct ast_frame *f, finterp = { .frametype = AST_FRAME_VOICE, };
        long now;
        int interpolation_len, res;
        
@@ -418,13 +418,9 @@ static void jb_get_and_deliver(struct ast_channel *chan)
                case JB_IMPL_INTERP:
                        /* interpolate a frame */
                        f = &finterp;
-                       f->frametype = AST_FRAME_VOICE;
                        f->subclass = jb->last_format;
-                       f->datalen  = 0;
                        f->samples  = interpolation_len * 8;
-                       f->mallocd  = 0;
                        f->src  = "JB interpolation";
-                       f->data  = NULL;
                        f->delivery = ast_tvadd(jb->timebase, ast_samp2tv(jb->next, 1000));
                        f->offset = AST_FRIENDLY_OFFSET;
                        /* deliver the interpolated frame */