diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-12-09 05:34:09 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-12-09 05:34:09 +0000 |
commit | 54853d25f85d420f2ca2ad7bfcaf4e9e964878bc (patch) | |
tree | ecbff9ac48b3e67665ed7632328ba9b7447608b2 | |
parent | 95a778b210b352a51f90d4198269ffe7a92b48e1 (diff) |
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
-rw-r--r-- | pjmedia/src/pjmedia/conference.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 |