From 54853d25f85d420f2ca2ad7bfcaf4e9e964878bc Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sun, 9 Dec 2007 05:34:09 +0000 Subject: Ticket #427: conference bridge does not handle NONE frame (thanks Daniel Braun) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1623 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/src/pjmedia/conference.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pjmedia/src/pjmedia/conference.c b/pjmedia/src/pjmedia/conference.c index 7dd1fa31..723adbae 100644 --- a/pjmedia/src/pjmedia/conference.c +++ b/pjmedia/src/pjmedia/conference.c @@ -1269,6 +1269,9 @@ static pj_status_t read_port( pjmedia_conf *conf, } else { + /* Initialize frame type to None */ + *type = PJMEDIA_FRAME_TYPE_NONE; + /* * If we don't have enough samples in rx_buf, read from the port * first. Remember that rx_buf may be in different clock rate! @@ -1296,6 +1299,9 @@ static pj_status_t read_port( pjmedia_conf *conf, TRACE_((THIS_FILE, " get_frame returned non-audio")); pjmedia_zero_samples( cport->rx_buf + cport->rx_buf_count, cport->samples_per_frame); + } else { + /* We've got at least one frame */ + *type = PJMEDIA_FRAME_TYPE_AUDIO; } cport->rx_buf_count += cport->samples_per_frame; @@ -1718,6 +1724,10 @@ static pj_status_t get_frame(pjmedia_port *this_port, /* Check that the port is not removed when we call get_frame() */ if (conf->ports[i] == NULL) continue; + + /* Ignore if we didn't get any frame */ + if (frame_type != PJMEDIA_FRAME_TYPE_AUDIO) + continue; } /* If we need to adjust the RX level from this port, adjust the level -- cgit v1.2.3