[Ffmpeg-cvslog] r7312 - trunk/libavformat/x11grab.c
bcoudurier
subversion
Wed Dec 13 11:18:38 CET 2006
Author: bcoudurier
Date: Wed Dec 13 11:18:38 2006
New Revision: 7312
Modified:
trunk/libavformat/x11grab.c
Log:
dont segv is ap->device is not set, display error message
Modified: trunk/libavformat/x11grab.c
==============================================================================
--- trunk/libavformat/x11grab.c (original)
+++ trunk/libavformat/x11grab.c Wed Dec 13 11:18:38 2006
@@ -101,6 +101,11 @@
return AVERROR_IO;
}
+ if (!ap->device) {
+ av_log(s1, AV_LOG_ERROR, "AVParameters don't specify any device. Use -vd.\n");
+ return AVERROR_IO;
+ }
+
sscanf(ap->device, "x11:%d,%d", &x_off, &y_off);
av_log(s1, AV_LOG_INFO, "device: %s -> x: %d y: %d width: %d height: %d\n", ap->device, x_off, y_off, ap->width, ap->height);
More information about the ffmpeg-cvslog
mailing list