[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linphone-developers] Enchancement (Bug fix) for videostream.c
From: |
Vadim Lebedev |
Subject: |
[Linphone-developers] Enchancement (Bug fix) for videostream.c |
Date: |
Mon, 21 Dec 2009 15:59:57 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
Hello,
We've stumbled on a when trying to use linphone with a ffmmeg
integrated with hardware based
H263 and H264 decoder.
The problem that the interface code for the decoder does not support
multiple decoder instances,
so the original code in 'video_stream_change_decoder' which creates
new decoder instance before
destroing original one, caused havoc.
So we've changed the code to avoid the problem.
I hop it will be accpted in the main tree...
Thans
vadim
=================================================
void video_stream_change_decoder(VideoStream *stream, int payload){
RtpSession *session=stream->session;
RtpProfile *prof=rtp_session_get_profile(session);
PayloadType *pt=rtp_profile_get_payload(prof,payload);
if (pt!=NULL){
ms_filter_unlink(stream->rtprecv, 0, stream->decoder, 0);
ms_filter_unlink(stream->decoder,0,stream->output,0);
ms_filter_postprocess(stream->decoder);
ms_filter_destroy(stream->decoder);
stream->decoder=0;
MSFilter *dec=ms_filter_create_decoder(pt->mime_type);
if (dec!=NULL){
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);
ms_filter_link (stream->decoder,0 , stream->output, 0);
ms_filter_preprocess(stream->decoder,stream->ticker);
}else{
ms_warning("No decoder found for %s",pt->mime_type);
}
}else{
ms_warning("No payload defined with number %i",payload);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Linphone-developers] Enchancement (Bug fix) for videostream.c,
Vadim Lebedev <=