FIx issue 332

This commit is contained in:
bossiel 2013-12-10 11:36:36 +00:00
parent 96d05d239a
commit e6aab8bce3
2 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,7 @@ int twrap_consumer_proxy_audio_prepare(tmedia_consumer_t* self, const tmedia_cod
self->audio.in.rate = TMEDIA_CODEC_RATE_DECODING(codec);
ret = audio->pcConsumer->getCallback()->prepare((int)self->audio.ptime, self->audio.in.rate, self->audio.in.channels);
if(ret == 0){
if(ret == 0 && !audio->pcConsumer->getCallback()->isPivotSettings()){
// say consumer can output these params
// Out "rate" and "channels" must be defined regardless previous values (already the case in other back-ends) to avoid issues on reINVITE with rate change (e.g. Opus -> PCMA).
/*if(!self->audio.out.rate)*/ self->audio.out.rate = self->audio.in.rate;

View File

@ -51,6 +51,8 @@ public:
#if !defined(SWIG)
// whether the audio buffer have to be stored in the JB then pulled using "ProxyAudioConsumer::pull()" or not
virtual bool putInJitterBuffer(){ return true; }
// whether we are using the "telepresence" system (PIVOT audio settings must not be changed)
virtual bool isPivotSettings() { return false; }
// only called if "putInJitterBuffer()" return "true"
virtual int consume(const void* buffer_ptr, tsk_size_t buffer_size, const tsk_object_t* proto_hdr){ return -1; }
#endif