diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-05-04 22:12:55 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-05-06 18:33:16 +0300 |
commit | b68f9fef32971095836ea6bbeb2f12af417120d2 (patch) | |
tree | 46288d0356764318d595a946d22ca31eaf6b0101 /libvo | |
parent | 40f6ab5064a628dc11b79b5e571dc9444efac093 (diff) | |
download | mpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.bz2 mpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.xz |
cleanup: shut up more warnings
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_aa.c | 9 | ||||
-rw-r--r-- | libvo/vo_matrixview.c | 2 | ||||
-rw-r--r-- | libvo/vo_x11.c | 16 | ||||
-rw-r--r-- | libvo/vo_xv.c | 4 |
4 files changed, 8 insertions, 23 deletions
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c index cfe0b10e71..4908e3c899 100644 --- a/libvo/vo_aa.c +++ b/libvo/vo_aa.c @@ -349,7 +349,7 @@ draw_frame(uint8_t *src[]) { break; } - sws_scale(sws,src,stride,0,src_height,image,image_stride); + sws_scale(sws,(const uint8_t **)src,stride,0,src_height,image,image_stride); /* Now 'ASCIInate' the image */ if (fast) @@ -369,7 +369,7 @@ draw_slice(uint8_t *src[], int stride[], int dx2 = screen_x + ((x+w) * screen_w / src_width); int dy2 = screen_y + ((y+h) * screen_h / src_height); - sws_scale(sws,src,stride,y,h,image,image_stride); + sws_scale(sws,(const uint8_t **)src,stride,y,h,image,image_stride); /* Now 'ASCIInate' the image */ if (fast) @@ -668,7 +668,7 @@ static int preinit(const char *arg) { char * hidis = NULL; struct stat sbuf; - int fd, vt, major, minor; + int fd, vt; FILE * fp; char fname[12]; @@ -686,8 +686,7 @@ static int preinit(const char *arg) /* check only, if no driver is explicit set */ fd = dup (fileno (stderr)); fstat (fd, &sbuf); - major = sbuf.st_rdev >> 8; - vt = minor = sbuf.st_rdev & 0xff; + vt = sbuf.st_rdev & 0xff; // hi: major, low: minor close (fd); sprintf (fname, "/dev/vcsa%2.2i", vt); fp = fopen (fname, "w+"); diff --git a/libvo/vo_matrixview.c b/libvo/vo_matrixview.c index 496d122a4c..28faeafb01 100644 --- a/libvo/vo_matrixview.c +++ b/libvo/vo_matrixview.c @@ -188,7 +188,7 @@ static void flip_page(void) static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y) { - sws_scale(sws, src, stride, y, h, map_image, map_stride); + sws_scale(sws, (const uint8_t **)src, stride, y, h, map_image, map_stride); return 0; } diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index ec85c7b747..8e34503bb9 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -306,12 +306,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) { -// int screen; - -// int interval, prefer_blank, allow_exp, nothing; - unsigned int fg, bg; Colormap theCmap; - XSetWindowAttributes xswa; unsigned long xswamask; const struct fmt2Xfmtentry_s *fmte = fmt2Xfmt; @@ -358,22 +353,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, vo_vm_switch(); } #endif - bg = WhitePixel(mDisplay, mScreen); - fg = BlackPixel(mDisplay, mScreen); - theCmap = vo_x11_create_colormap(&vinfo); - xswa.background_pixel = 0; - xswa.border_pixel = 0; - xswa.colormap = theCmap; xswamask = CWBackPixel | CWBorderPixel | CWColormap; #ifdef CONFIG_XF86VM if (vm) - { - xswa.override_redirect = True; xswamask |= CWOverrideRedirect; - } #endif vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight, @@ -553,7 +539,7 @@ static int draw_slice(uint8_t * src[], int stride[], int w, int h, dst[0] += dstStride[0] * (image_height - 1); dstStride[0] = -dstStride[0]; } - sws_scale(swsContext, src, stride, y, h, dst, dstStride); + sws_scale(swsContext, (const uint8_t **)src, stride, y, h, dst, dstStride); return 0; } diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 67d1cffb95..6da354bd5a 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -527,7 +527,7 @@ static uint32_t draw_image(struct vo *vo, mp_image_t *mpi) if (mpi->flags & MP_IMGFLAG_DIRECT) // direct rendering: - ctx->current_buf = (int) (mpi->priv); // hack! + ctx->current_buf = (size_t)(mpi->priv); // hack! else if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK) ; // done else if (mpi->flags & MP_IMGFLAG_PLANAR) @@ -603,7 +603,7 @@ static uint32_t get_image(struct xvctx *ctx, mp_image_t *mpi) } } mpi->flags |= MP_IMGFLAG_DIRECT; - mpi->priv = (void *) ctx->current_buf; + mpi->priv = (void *)(size_t)ctx->current_buf; return VO_TRUE; } return VO_FALSE; |