mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-12-26 23:26:46 +01:00
properly handle errors when reading TS
This commit is contained in:
@@ -689,9 +689,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
switch (odvr){
|
||||
case 1:
|
||||
memset(buf, 0, BUFFSIZE);
|
||||
while(1){
|
||||
read(fd,buf,BUFFSIZE);
|
||||
write(fileno(stdout),buf,BUFFSIZE);
|
||||
int r = read(fd,buf,BUFFSIZE);
|
||||
if (r == BUFFSIZE)
|
||||
write(fileno(stdout),buf,r);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
||||
Reference in New Issue
Block a user