Commit 60493a33 authored by Yann Diorcet's avatar Yann Diorcet
Browse files

Fix decoder change issue in audio_stream_change_decoder

parent 343d9116
......@@ -259,17 +259,16 @@ void audio_stream_change_decoder(AudioStream *stream, int payload){
if (pt!=NULL){
MSFilter *dec=ms_filter_create_decoder(pt->mime_type);
if (dec!=NULL){
MSFilter *nextFilter = stream->decoder->outputs[0]->next;
ms_filter_unlink(stream->rtprecv, 0, stream->decoder, 0);
if (stream->dtmfgen)
ms_filter_unlink(stream->decoder, 0, stream->dtmfgen, 0);
ms_filter_unlink(stream->decoder, 0, nextFilter, 0);
ms_filter_postprocess(stream->decoder);
ms_filter_destroy(stream->decoder);
stream->decoder=dec;
if (pt->recv_fmtp!=NULL)
ms_filter_call_method(stream->decoder,MS_FILTER_ADD_FMTP,(void*)pt->recv_fmtp);
ms_filter_link(stream->rtprecv, 0, stream->decoder, 0);
if (stream->dtmfgen)
ms_filter_link(stream->decoder, 0, stream->dtmfgen, 0);
ms_filter_link(stream->decoder, 0, nextFilter, 0);
ms_filter_preprocess(stream->decoder,stream->ticker);
}else{
......
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