Hello,
this report goes to
Maintainer: Ubuntu MOTU Developers <[email protected]>
Original-Maintainer: Erik Schanze <[EMAIL PROTECTED]>
dvgrab's commandline option "-" tells that the grabed shout go to stdout.
getopt_long_only() on my system does not honour the "-"-only option, specified
with char *opts = "d:hif:F:I:s:tVv-". At the point, "-" is evaluated,
the while loop terminates, and "-" is interpreted as filename, which results
in files like "-001.avi".
The patch below fixes the problem.
Generally, "-" may lead to misunderstandings: is it meant for stdin or
stdout.. - one has to look at the doku.
dvgrab has "-I -" or "-stin" for reading from stdin, and perhaps it
would be wise to be consequent and to also provide "-O -" and "-stdout"
for the stdout case. Thus, if getopt() on a system is broken, the user
would have still a chance to grab to stdout without the need of recompile ;)
Regards,
- Thomas
Appendix: fix for grabing to stdout on ubuntu gutsy amd64
---------------------------------------------------------
diff -Naur dvgrab-3.0/dvgrab.cc.orig dvgrab-3.0/dvgrab.cc
--- dvgrab-3.0/dvgrab.cc.orig 2007-08-07 05:00:43.000000000 +0200
+++ dvgrab-3.0/dvgrab.cc 2007-12-06 18:55:58.000000000 +0100
@@ -447,8 +447,14 @@
if ( optind < argc )
{
- m_dst_file_name = argv[ optind++ ];
- set_format_from_name();
+ /* option "-" not evaluated above. getopt_long_only() compat
issue? */
+ if (!strcmp(argv[ optind ], "-")) {
+ m_raw_pipe = true;
+ optind++;
+ } else {
+ m_dst_file_name = argv[ optind++ ];
+ set_format_from_name();
+ }
}
if ( optind < argc )
--
Ubuntu-motu mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu