diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-10 12:20:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-10 12:33:37 +0100 |
commit | 81a045fe17d533192a9fb897cb4d71ed44c877e3 (patch) | |
tree | 21d098f43ae77e4ac7d5420f1c069e3f9bad59b5 /libavdevice/xcbgrab.c | |
parent | d43d5c5707532858b4f6a54525f1768464bcb3c2 (diff) | |
parent | 2c3f29c4894ee50635b846f202296ad79a7c0d33 (diff) | |
download | ffmpeg-81a045fe17d533192a9fb897cb4d71ed44c877e3.tar.gz |
Merge commit '2c3f29c4894ee50635b846f202296ad79a7c0d33'
* commit '2c3f29c4894ee50635b846f202296ad79a7c0d33':
xcbgrab: Support empty filename string correctly
Conflicts:
libavdevice/xcbgrab.c
See: 62eca2f827d441f52125191fd78c96b67a7ba30c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/xcbgrab.c')
-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 ca85186087..c3cc8484cc 100644 --- a/libavdevice/xcbgrab.c +++ b/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); |