ref: 4026d31b2f1574ac617e773c019be7b69d8ccaa0
parent: 94d64d663d67e8553bb95a138574737147b38426
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Aug 4 14:10:37 EDT 2021
use stdin if -v option not used
--- a/main.c
+++ b/main.c
@@ -12,7 +12,7 @@
static void
usage(void)
{
- fprint(2, "usage: %s [-a AUDIO] -v VIDEO [URL]\n", argv0);
+ fprint(2, "usage: %s [-a AUDIO] [-v VIDEO] [URL]\n", argv0);
threadexitsall("usage");
}
@@ -47,7 +47,7 @@
if(argc != 1)
usage();
if(v == nil)
- sysfatal("no video specified");
+ v = Bfdopen(0, OREAD);
if(ivfopen(v, &ivf) != 0)
sysfatal("%r");
if(strcmp(ivf.type, "AVC1") != 0)