[FFmpeg-cvslog] xcbgrab: Support empty filename string correctly
Luca Barbato
git at videolan.org
Wed Dec 10 12:43:57 CET 2014
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Wed Nov 26 06:20:52 2014 +0100| [2c3f29c4894ee50635b846f202296ad79a7c0d33] | committer: Luca Barbato
xcbgrab: Support empty filename string correctly
Bug-Id: CID 1254664
CC: libav-stable at libav.org
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2c3f29c4894ee50635b846f202296ad79a7c0d33
---
libavdevice/xcbgrab.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index 5055fde..243ece4 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);
More information about the ffmpeg-cvslog
mailing list