[Nice] nicesrc outbuf overwritten before read

Daniel Lindström erdanlin at gmail.com
Tue Jun 21 07:30:10 PDT 2011


I have some problem and was hoping I could get some help from this
mailing list. I'm trying to send video from A to B with libnice and
gstreamer. The scenario not working for me is when A and B are on the
same computer, so the host candidates are used. If I do not set the
relay server (nice_agent_set_relay_info) everything works fine and it
uses the host candidate. If I do set the relay server it still uses
the host candidate as intended, but something goes wrong between
libnice and nicesrc, or nicesrc and rtpjpegpayload in the gstreamer

What happends seems to be the following scenario:

gst_nice_src_create is called and it calls g_main_loop_run to wait for a buffer
gst_nice_src_read_callback is called from libnice with a buffer which
is saved to the outbuf of the nicesrc. When done it calls

Now I would expect gst_nice_src_create to continue the execution, but
instead gst_nice_src_read_callback is called again and the allocated
outbuf is overwritten.

For some reason it also works if the frame is small enough to fit in
one MTU (by coding it really small or raising the MTU on rtpjpegpay)..
However, I don't think there is any problem in the payload packitizer
/ depackitizer since the fact that it does not matter if I use any
other kind of payload, and it does work if I do net set the relay

Can it be that I have misunderstood how some component should be used,
or is there a bug somewhere? I'm thankful for all help.


- Daniel

More information about the Nice mailing list