[gst-devel] segfault changing "host" field of "tcpserversrc" element?

Zeeshan Ali zeenix at gmail.com
Tue Feb 1 21:00:30 CET 2005


Hello,

> I've been tinkering with some code that sets up a filter graph using
> (among other elements) "tcpserversrc".  In the code, I'm trying to
> change the "host" field after the element has been created but before
> the filter graph has started playing.

     Then you should change the "host" field of tcpserversrc just
before you put it's parent pipeline into PLAYING or READY state.

> What I see is that any call to change the "host" field with:
> 
> g_object_set(G_OBJECT(element), "host", <any null terminated ascii
> string>, NULL);
> 
> causes an immediate segfault.   The string I'm trying to set it to has
> been computed from a network interface name, something like this
> (sorry about the whitespace mangling):
> 
>       ...
>       char ipaddr[64];
>       ....
>       cc = ipbyif("eth0", ipaddr, 64);
>       ...
>       g_object_set(G_OBJECT(element), "host", ipaddr, NULL);
>       ...
> 
> Does anyone have an idea of what might be wrong?

   It might be that the string you get from ipbyif isn't correct? Have
you tried printing it before setting it on tcpserversrc? That may give
you (us) a clue.

P.S where do you get this ipbyif from? Google faild quite miserably over it.




More information about the gstreamer-devel mailing list