Commit a99d6b0d authored by Simon Morlat's avatar Simon Morlat
Browse files

fix bad handling of audio rate in audio conference when opus codec is used on android.

parent b6ad773d
......@@ -431,7 +431,7 @@ MS2_PUBLIC int ms_filter_call_method_noarg(MSFilter *f, unsigned int id);
* @param f A MSFilter object.
* @param id A method ID.
*
* Returns: 0 if successfull, -1 otherwise.
* Returns: TRUE if method is implemented, FALSE otherwise.
*/
MS2_PUBLIC bool_t ms_filter_has_method(MSFilter *f, unsigned int id);
......
......@@ -103,7 +103,9 @@ static void cut_audio_stream_graph(MSAudioEndpoint *ep, bool_t is_remote){
ep->out_cut_point=just_before(st->ms.encoder);
ms_filter_unlink(ep->out_cut_point.filter,ep->out_cut_point.pin,st->ms.encoder,0);
ms_filter_call_method(st->ms.rtpsend,MS_FILTER_GET_SAMPLE_RATE,&ep->samplerate);
if (ms_filter_has_method(st->ms.encoder,MS_FILTER_GET_SAMPLE_RATE)){
ms_filter_call_method(st->ms.encoder,MS_FILTER_GET_SAMPLE_RATE,&ep->samplerate);
}else ms_warning("MSAudioConference: filter %s does not implement MS_FILTER_GET_SAMPLE_RATE, assuming 8khz",st->ms.encoder->desc->name);
if (is_remote){
ep->mixer_in.filter=ep->in_cut_point_prev.filter;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment