cvs: gd /playground/ffmpeg ffmpeg_thumb.c
[email protected] ("Pierre-Alain Joye")
| Newsgroups | php.gd.cvs |
|---|---|
| Message-ID | <cvspajoye1173705195@cvsserver> |
pajoye Mon Mar 12 13:13:15 2007 UTC
Modified files:
/gd/playground/ffmpeg ffmpeg_thumb.c
Log:
- use the first cmd line argument as input filename
http://cvs.php.net/viewvc.cgi/gd/playground/ffmpeg/ffmpeg_thumb.c?r1=1.1&r2=1.2&diff_format=u
Index: gd/playground/ffmpeg/ffmpeg_thumb.c
diff -u gd/playground/ffmpeg/ffmpeg_thumb.c:1.1 gd/playground/ffmpeg/ffmpeg_thumb.c:1.2
--- gd/playground/ffmpeg/ffmpeg_thumb.c:1.1 Mon Mar 12 11:46:07 2007
+++ gd/playground/ffmpeg/ffmpeg_thumb.c Mon Mar 12 13:13:15 2007
@@ -83,7 +83,14 @@
AVFormatParameters params, *ap = ¶ms;
- const char *file = "sg1.avi";
+ const char *file;
+
+ if (argc < 2) {
+ printf("No input file given.\n");
+ return -1;
+ }
+ printf("argc: %i\n", argc);
+ file = argv[1];
/* Register all formats and codecs */
av_register_all();