OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
754f495
)
avdevice/xcbgrab: check xcb_query_pointer_reply_t pointer before use
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 9 Dec 2014 00:54:51 +0000
(
01:54
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 9 Dec 2014 00:54:51 +0000
(
01:54
+0100)
Fixes CID1254668
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/xcbgrab.c
patch
|
blob
|
history
diff --git
a/libavdevice/xcbgrab.c
b/libavdevice/xcbgrab.c
index
f2b9135
..
ca85186
100644
(file)
--- a/
libavdevice/xcbgrab.c
+++ b/
libavdevice/xcbgrab.c
@@
-106,12
+106,17
@@
static int xcbgrab_reposition(AVFormatContext *s,
xcb_get_geometry_reply_t *geo)
{
XCBGrabContext *c = s->priv_data;
- int x
= c->x, y = c->y, p_x = p->win_x, p_y = p->win
_y;
+ int x
, y, p_x, p
_y;
int w = c->width, h = c->height, f = c->follow_mouse;
if (!p || !geo)
return AVERROR(EIO);
+ x = c->x;
+ y = c->y;
+ p_x = p->win_x;
+ p_y = p->win_y;
+
if (f == FOLLOW_CENTER) {
x = p_x - w / 2;
y = p_y - h / 2;