Merge commit '20e82b41fcad23ebbb18d89948aebfcc53921198'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 28 Aug 2014 19:39:19 +0000 (21:39 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 28 Aug 2014 19:39:19 +0000 (21:39 +0200)
* commit '20e82b41fcad23ebbb18d89948aebfcc53921198':
  x11grab: Small near-cosmetic refactorings

Conflicts:
libavdevice/x11grab.c

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

@@@ -164,29 -156,18 +160,25 @@@ static int x11grab_read_header(AVFormat
      AVStream *st = NULL;
      enum AVPixelFormat input_pixfmt;
      XImage *image;
-     int x_off = 0;
-     int y_off = 0;
-     int screen;
-     int use_shm = 0;
 -    int x_off = 0, y_off = 0, ret = 0, screen, use_shm;
 -    char *param, *offset;
 -    AVRational framerate;
 -
 -    param = av_strdup(s1->filename);
 -    if (!param)
++    int x_off = 0, y_off = 0, ret = 0, screen, use_shm = 0;
 +    char *dpyname, *offset;
-     int ret = 0;
 +    Colormap color_map;
 +    XColor color[256];
 +    int i;
 +
 +    dpyname = av_strdup(s1->filename);
 +    if (!dpyname)
          goto out;
  
 -    offset = strchr(param, '+');
 +    offset = strchr(dpyname, '+');
      if (offset) {
          sscanf(offset, "%d,%d", &x_off, &y_off);
 -        x11grab->draw_mouse = !strstr(offset, "nomouse");
 +        if (strstr(offset, "nomouse")) {
 +            av_log(s1, AV_LOG_WARNING,
 +                   "'nomouse' specification in argument is deprecated: "
 +                   "use 'draw_mouse' option with value 0 instead\n");
 +            x11grab->draw_mouse = 0;
 +        }
          *offset = 0;
      }