diff options
Diffstat (limited to 'src/blind-next-frame.c')
| -rw-r--r-- | src/blind-next-frame.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/blind-next-frame.c b/src/blind-next-frame.c index 260c375..be6c303 100644 --- a/src/blind-next-frame.c +++ b/src/blind-next-frame.c @@ -6,13 +6,11 @@ USAGE("[-f frames] width height pixel-format ...") int main(int argc, char *argv[]) { - struct stream stream; + struct stream stream = { .frames = 1, .fd = STDIN_FILENO, .file = "<stdin>" }; size_t n; int i; char *p; - stream.frames = 1; - ARGBEGIN { case 'f': stream.frames = entozu_flag(2, 'f', UARGF(), 1, SIZE_MAX); @@ -24,10 +22,7 @@ main(int argc, char *argv[]) if (argc < 3) usage(); - stream.fd = STDIN_FILENO; - stream.file = "<stdin>"; stream.pixfmt[0] = '\0'; - stream.width = entozu_arg(2, "the width", argv[0], 1, SIZE_MAX); stream.height = entozu_arg(2, "the height", argv[1], 1, SIZE_MAX); argv += 2, argc -= 2; @@ -42,8 +37,7 @@ main(int argc, char *argv[]) p = stpcpy(p, argv[i]); } } - - enset_pixel_size(2, &stream); + enset_pixel_format(2, &stream, NULL); fprint_stream_head(stdout, &stream); enfflush(2, stdout, "<stdout>"); |
