summaryrefslogtreecommitdiff
path: root/libavdevice/xcbgrab.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-15 20:42:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-15 20:42:52 +0100
commit3171ac209b04726496a3eaa296629d40f25c2af8 (patch)
treeceea499b2fc7bbe85ad271d399b304cc80939e52 /libavdevice/xcbgrab.c
parent7d56aab2de7725bbf6fd378d1652ef531a782d72 (diff)
parentd40815a982c36ff9da09ae3edb5e3bd7d97b5d42 (diff)
Merge commit 'd40815a982c36ff9da09ae3edb5e3bd7d97b5d42'
* commit 'd40815a982c36ff9da09ae3edb5e3bd7d97b5d42': xcbgrab: Correctly make shm optional Conflicts: libavdevice/xcbgrab.c See: 8c0ae9015a2bd8b3f4f92c35570e592e7fdeaef0 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/xcbgrab.c')
-rw-r--r--libavdevice/xcbgrab.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index e26448ccfb..6a33c60eef 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -54,7 +54,6 @@ typedef struct XCBGrabContext {
#if CONFIG_LIBXCB_SHM
xcb_shm_seg_t segment;
#endif
-
int64_t time_frame;
AVRational time_base;
@@ -629,10 +628,6 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
return AVERROR(EIO);
}
-#if CONFIG_LIBXCB_SHM
- c->segment = xcb_generate_id(c->conn);
-#endif
-
ret = create_stream(s);
if (ret < 0) {
@@ -641,7 +636,8 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
}
#if CONFIG_LIBXCB_SHM
- c->has_shm = check_shm(c->conn);
+ if ((c->has_shm = check_shm(c->conn)))
+ c->segment = xcb_generate_id(c->conn);
#endif
#if CONFIG_LIBXCB_XFIXES