[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ccrtp-devel] sending a jpeg file
From: |
Federico Montesino Pouzols |
Subject: |
Re: [Ccrtp-devel] sending a jpeg file |
Date: |
Fri, 8 Apr 2005 23:01:51 +0200 |
User-agent: |
Mutt/1.5.8i |
On Thu, Apr 07, 2005 at 12:25:21PM +0200, Andreas Mueller wrote:
> hi @all,
>
> I just started to get familiar with ccrtp and therfor I tried to send a
> file from a sender to a receiver. I tried it this way:
>
> int i=0;
> char buffer;
> ifstream examplefile ("test.jpg");
> while (! examplefile.eof() )
> {
> buffer=examplefile.get ();
> putData(timestamp+ i*tstampInc,(unsigned
> char*)buffer,strlen((char *)buffer));
> Thread::sleep(TimerPort::getTimer());
> TimerPort::incTimer(period);
> ++i;
> }
>
> but i always get a Segmentation fault. I guess the third argument of
> putData is the problem but I have no idea how to solve it.
>
> can anybody help me?
Yes, it seems a problem with pointers, try using &buffer instead of
buffer or declaring buffer as a pointer.