[FFmpeg-devel] [PATCH] Fix segfault with x11grab when switching windows.
Matthew Smiglarski
matthew.smiglarski at gmail.com
Thu Apr 30 22:27:25 CEST 2015
The segfault occurred when running ffmpeg with x11grab and specifying a
resolution size greater than the screen, alongside an offset:
./ffmpeg -f x11grab -r 30 -s 1920x1147 -i :0.0+0,53 output.mkv
Signed-off-by: Matt Smiglarski <matthew.smiglarski at gmail.com>
---
libavdevice/xcbgrab.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index 777bd25..79324dd 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -309,6 +309,9 @@ static void xcbgrab_draw_mouse(AVFormatContext *s,
AVPacket *pkt,
xcb_xfixes_get_cursor_image_reply_t *ci;
int cx, cy, x, y, w, h, c_off, i_off;
+ if (!image)
+ return;
+
cc = xcb_xfixes_get_cursor_image(gr->conn);
ci = xcb_xfixes_get_cursor_image_reply(gr->conn, cc, NULL);
if (!ci)
--
2.1.4
More information about the ffmpeg-devel
mailing list