Merge commit '2c3f29c4894ee50635b846f202296ad79a7c0d33'

* commit '2c3f29c4894ee50635b846f202296ad79a7c0d33':
  xcbgrab: Support empty filename string correctly

Conflicts:
	libavdevice/xcbgrab.c

See: 62eca2f827
Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/101/head
Michael Niedermayer 10 years ago
commit 81a045fe17
  1. 4
      libavdevice/xcbgrab.c

@ -613,11 +613,11 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
sscanf(s->filename, "+%d,%d", &c->x, &c->y);
}
c->conn = xcb_connect(display_name, &screen_num);
c->conn = xcb_connect(display_name[0] ? display_name : NULL, &screen_num);
av_freep(&display_name);
if ((ret = xcb_connection_has_error(c->conn))) {
av_log(s, AV_LOG_ERROR, "Cannot open display %s, error %d.\n",
(*s->filename) ? s->filename : "default", ret);
s->filename[0] ? s->filename : "default", ret);
return AVERROR(EIO);
}
setup = xcb_get_setup(c->conn);

Loading…
Cancel
Save