[Redbutton-devel] SF.net SVN: redbutton: [21] redbutton-download/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-03-15 16:03:36
|
Revision: 21 Author: skilvington Date: 2006-03-15 08:03:26 -0800 (Wed, 15 Mar 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=21&view=rev Log Message: ----------- open audio and video streams in blocking mode Modified Paths: -------------- redbutton-download/trunk/command.c redbutton-download/trunk/stream.c Modified: redbutton-download/trunk/command.c =================================================================== --- redbutton-download/trunk/command.c 2006-03-15 14:47:18 UTC (rev 20) +++ redbutton-download/trunk/command.c 2006-03-15 16:03:26 UTC (rev 21) @@ -162,7 +162,7 @@ } /* we can now read a transport stream from the dvr device */ - if((ts_fd = open(car->dvr_device, O_RDONLY | O_NONBLOCK)) < 0) + if((ts_fd = open(car->dvr_device, O_RDONLY)) < 0) { SEND_RESPONSE(500, "Unable to open DVB device"); close(audio_fd); @@ -222,7 +222,7 @@ } /* we can now read a transport stream from the dvr device */ - if((ts_fd = open(car->dvr_device, O_RDONLY | O_NONBLOCK)) < 0) + if((ts_fd = open(car->dvr_device, O_RDONLY)) < 0) { SEND_RESPONSE(500, "Unable to open DVB device"); close(video_fd); @@ -297,7 +297,7 @@ } /* we can now read a transport stream from the dvr device */ - if((ts_fd = open(car->dvr_device, O_RDONLY | O_NONBLOCK)) < 0) + if((ts_fd = open(car->dvr_device, O_RDONLY)) < 0) { SEND_RESPONSE(500, "Unable to open DVB device"); close(audio_fd); Modified: redbutton-download/trunk/stream.c =================================================================== --- redbutton-download/trunk/stream.c 2006-03-15 14:47:18 UTC (rev 20) +++ redbutton-download/trunk/stream.c 2006-03-15 16:03:26 UTC (rev 21) @@ -54,8 +54,10 @@ nread = read(ts_fd, _ts_buf, sizeof(_ts_buf)); if(nread > 0) nwritten = write(client_sock, _ts_buf, nread); + else + nwritten = nread; } - while(nread > 0 && nread == nwritten); + while(nread == nwritten); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |