Commit 749af62b authored by bcoudurier's avatar bcoudurier

dont segv is ap->device is not set, display error message

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7312 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a85047ec
......@@ -101,6 +101,11 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment