Merge commit '89fa2b5616274194d90bde0aeebf6adbd1245193'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Oct 2014 01:06:14 +0000 (03:06 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Oct 2014 01:14:35 +0000 (03:14 +0200)
* commit '89fa2b5616274194d90bde0aeebf6adbd1245193':
  x11grab: Check for XFixes availability at runtime

See: a65c0a3fe822386be30fd3371af9f0d008b02874
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavdevice/x11grab.c

@@@ -326,9 -331,15 +339,15 @@@ static int x11grab_read_header(AVFormat
                            AllPlanes, ZPixmap);
      }
  
+     if (x11grab->draw_mouse && setup_mouse(dpy, screen) < 0) {
+         av_log(s1, AV_LOG_WARNING,
+                "XFixes not available, cannot draw the mouse cursor\n");
+         x11grab->draw_mouse = 0;
+     }
      x11grab->frame_size = x11grab->width * x11grab->height * image->bits_per_pixel / 8;
      x11grab->dpy        = dpy;
 -    x11grab->time_base  = (AVRational) { framerate.den, framerate.num };
 +    x11grab->time_base  = av_inv_q(x11grab->framerate);
      x11grab->time_frame = av_gettime() / av_q2d(x11grab->time_base);
      x11grab->x_off      = x_off;
      x11grab->y_off      = y_off;