[streaming] rtp streaming---recv returns segfault

Anand Anand taknevski at gmail.com
Sat Sep 29 08:24:18 CEST 2007


Hi,
   I am trying to build a streaming client for myself using vlc and I tried
to  enable unicast reception by doing the following:
/*
       fd = socket(AF_INET, SOCK_DGRAM, 0);
       memset(&addr, 0, sizeof(addr));
       addr.sin_addr.s_addr = htonl(INADDR_ANY);
       addr.sin_port = htons(1234);
       bind( fd , (struct sockaddr *)&addr, sizeof( addr ) );
       i_opt = 1;
       setsockopt( fd, SOL_SOCKET, SO_REUSEADDR, (void *) &i_opt,
                    sizeof( i_opt ) );

       setsockopt( fd, SOL_SOCKET, SO_BROADCAST, (void*) &i_opt,
                        sizeof( i_opt ) );

       shutdown( fd, SHUT_WR );
*/

i then tried to receive packets by doing the following:
/*
p_block->i_buffer = recv(fd, p_block->p_buffer, i_mtu, 0 ) ;
*/

but a segfault occurs at the recv call..

I ran the vlc server using the command using:  vlc -vvv
/home/Desktop/anand_media_player/HWKD.mp3 --sout rtp:127.0.0.1

because i ran both the client on server on the same local machine..

Can someone point out to me what the problem is please?

Thanks,
Anand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.videolan.org/pipermail/streaming/attachments/20070929/562517bb/attachment.htm 


More information about the streaming mailing list