summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-05-04 22:12:55 +0200
committerUoti Urpala <uau@mplayer2.org>2011-05-06 18:33:16 +0300
commitb68f9fef32971095836ea6bbeb2f12af417120d2 (patch)
tree46288d0356764318d595a946d22ca31eaf6b0101 /sub
parent40f6ab5064a628dc11b79b5e571dc9444efac093 (diff)
downloadmpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.bz2
mpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.xz
cleanup: shut up more warnings
Diffstat (limited to 'sub')
-rw-r--r--sub/font_load.c3
-rw-r--r--sub/font_load_ft.c12
-rw-r--r--sub/spudec.c2
-rw-r--r--sub/sub.c4
4 files changed, 11 insertions, 10 deletions
diff --git a/sub/font_load.c b/sub/font_load.c
index e9980b8e41..7bf7775501 100644
--- a/sub/font_load.c
+++ b/sub/font_load.c
@@ -27,6 +27,7 @@
#include "font_load.h"
#include "mp_msg.h"
+#include "libavutil/attributes.h"
raw_file* load_raw(char *name,int verbose){
int bpp;
@@ -76,7 +77,7 @@ char section[64];
int i,j;
int chardb=0;
int fontdb=-1;
-int version=0;
+int version av_unused;
int first=1;
desc=malloc(sizeof(font_desc_t));if(!desc) goto fail_out;
diff --git a/sub/font_load_ft.c b/sub/font_load_ft.c
index 41a0f886cb..a501cfc750 100644
--- a/sub/font_load_ft.c
+++ b/sub/font_load_ft.c
@@ -131,8 +131,9 @@ static void paste_bitmap(unsigned char *bbuffer, FT_Bitmap *bitmap, int x, int y
static int check_font(font_desc_t *desc, float ppem, int padding, int pic_idx,
- int charset_size, FT_ULong *charset, FT_ULong *charcodes,
- int unicode) {
+ int charset_size, const FT_ULong *charset,
+ const FT_ULong *charcodes, int unicode)
+{
FT_Error error;
FT_Face face = desc->faces[pic_idx];
int const load_flags = FT_LOAD_DEFAULT;
@@ -611,9 +612,10 @@ void render_one_glyph(font_desc_t *desc, int c)
}
-static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx,
- int charset_size, FT_ULong *charset, FT_ULong *charcodes, int unicode,
- double thickness, double radius)
+static int prepare_font(font_desc_t *desc, FT_Face face, float ppem,
+ int pic_idx, int charset_size,
+ const FT_ULong *charset, const FT_ULong *charcodes,
+ int unicode, double thickness, double radius)
{
int i, err;
int padding = ceil(radius) + ceil(thickness);
diff --git a/sub/spudec.c b/sub/spudec.c
index dbf956bb25..48e219a930 100644
--- a/sub/spudec.c
+++ b/sub/spudec.c
@@ -872,7 +872,7 @@ static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh,
ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1;
- sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
+ sws_scale(ctx,(const uint8_t **)&s2,&ss,0,sh,&d2,&ds);
for (i=ds*dh-1; i>=0; i--) if (d2[i]==0) d2[i] = 1; else if (d2[i]==255) d2[i] = 0;
sws_freeContext(ctx);
}
diff --git a/sub/sub.c b/sub/sub.c
index 3edbb025d2..880793373c 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -673,7 +673,6 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i
unsigned char *t;
int c,i,j,l,x,y,font,prevc,counter;
int k;
- int lastStripPosition;
int xsize;
int xmin=dxs,xmax=0;
int h,lasth;
@@ -693,12 +692,11 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i
// too long lines divide into a smaller ones
i=k=lasth=0;
h=sub_font->height;
- lastStripPosition=-1;
l=vo_sub->lines;
{
struct osd_text_t *osl, *cp_ott, *tmp_ott, *tmp;
- struct osd_text_p *otp_sub = NULL, *otp_sub_tmp, // these are used to store the whole sub text osd
+ struct osd_text_p *otp_sub = NULL, *otp_sub_tmp = NULL, // these are used to store the whole sub text osd
*otp, *tmp_otp, *pmt; // these are used to manage sub text osd coming from a single sub line
int *char_seq, char_position, xlimit = dxs * sub_width_p / 100, counter;