diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-11-26 06:20:52 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-12-10 01:45:50 +0100 |
commit | 2c3f29c4894ee50635b846f202296ad79a7c0d33 (patch) | |
tree | ab329fc9652df175ed7e4296d4a846fc365ccb26 /libavdevice | |
parent | fa8934d6d6a0bb290010bdf16265c40b331d56fb (diff) | |
download | ffmpeg-2c3f29c4894ee50635b846f202296ad79a7c0d33.tar.gz |
xcbgrab: Support empty filename string correctly
Bug-Id: CID 1254664
CC: libav-stable@libav.org
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/xcbgrab.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c index 5055fde0c9..243ece4b1d 100644 --- a/libavdevice/xcbgrab.c +++ b/libavdevice/xcbgrab.c @@ -594,10 +594,10 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s) int screen_num, ret; const xcb_setup_t *setup; - c->conn = xcb_connect(s->filename, &screen_num); + c->conn = xcb_connect(s->filename[0] ? s->filename : NULL, &screen_num); 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); |