[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] bug in sdp_handler.c?
From: |
Simon Morlat |
Subject: |
Re: [Linphone-developers] bug in sdp_handler.c? |
Date: |
Tue, 13 Nov 2007 16:21:58 +0100 |
User-agent: |
KMail/1.9.7 |
Hi Vadim,
Thanks for the bug report; I have fixed it.
The sdphandler requires 3 callbacks to work:
sdp_handler_read_codec_func_t accept_audio_codecs; /*from remote sdp */
sdp_handler_write_codec_func_t set_audio_codecs; /*to local sdp */
sdp_handler_read_codec_func_t get_audio_codecs; /*from incoming answer */
and similarly 3 callbacks for video codecs.
- When you are called in set_audio_codecs() you must add your local payload
type using sdp_context_add_audio_payload().
- You are called in accept_audio_codecs() when receiving an incoming SDP
offer, and you must return 0 if you accept the payload, -1 otherwise.
- You are called in get_audio_codecs() when receiving SDP answer (after an
outgoing offer from your side) to get informed of payloads accepted by remote
side.
Is it clearer ?
(I agree the design of this piece of code is not very good...)
Simon
Le Friday 02 November 2007 20:35:17 Vadim Lebedev, vous avez écrit :
> Vadim Lebedev wrote:
> > Hello,
> >
> > Im looking on the sources at savannah and it seems
> > that
> >
> > void
> > sdp_context_read_answer (sdp_context_t *ctx, sdp_message_t *remote)
> >
> > Has a bug:
> >
> > There is a test if (sdph->get_audio_codecs != NULL)
> > ....
> >
> > // which is followed by call err = sdph->get_audio_codecs (ctx,
> > &payload);
> >
> >
> > IMO either the test or the call is wrong...
> > The same problem exists for video media too.
>
> Sorry folks,
>
> The bug is only in the VIDEO payload handling section....
>
> Thanks
> Vadim
>
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers