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:
10
lib/ddzap.c
10
lib/ddzap.c
@@ -689,10 +689,12 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
switch (odvr){
|
switch (odvr){
|
||||||
case 1:
|
case 1:
|
||||||
while(1){
|
memset(buf, 0, BUFFSIZE);
|
||||||
read(fd,buf,BUFFSIZE);
|
while(1){
|
||||||
write(fileno(stdout),buf,BUFFSIZE);
|
int r = read(fd,buf,BUFFSIZE);
|
||||||
}
|
if (r == BUFFSIZE)
|
||||||
|
write(fileno(stdout),buf,r);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
fprintf(stderr,"writing pamdata\n");
|
fprintf(stderr,"writing pamdata\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user