Skip to content

Commit

Permalink
setting placeholder image works
Browse files Browse the repository at this point in the history
  • Loading branch information
an146 committed Feb 12, 2012
1 parent ffadf2e commit f32b64f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions v4l2loopback_io.c
Expand Up @@ -118,9 +118,12 @@ do_read()
static int
do_write()
{
ssize_t written = read(STDIN_FILENO, buffer, buffer_size);
if (freopen(NULL, "rb", stdin) == NULL)
die("can't reopen stdin for binary input\n");

ssize_t written = fread(buffer, 1, buffer_size, stdin);
if (written < 0)
die_perror("read() failed");
die("fread() failed\n");

fprintf(stderr, "written %ld bytes\n", written);
return 0;
Expand Down

0 comments on commit f32b64f

Please sign in to comment.