diff options
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/sub.c | 12 | ||||
-rw-r--r-- | libvo/video_out.c | 12 | ||||
-rw-r--r-- | libvo/vo_fbdev2.c | 2 |
3 files changed, 14 insertions, 12 deletions
diff --git a/libvo/sub.c b/libvo/sub.c index 3187f935ea..ee845d685f 100644 --- a/libvo/sub.c +++ b/libvo/sub.c @@ -730,7 +730,7 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i render_one_glyph(sub_font, c); if (c == ' ') { - struct osd_text_t *tmp_ott = (struct osd_text_t *) calloc(1, sizeof(struct osd_text_t)); + struct osd_text_t *tmp_ott = calloc(1, sizeof(struct osd_text_t)); if (osl == NULL) { osl = cp_ott = tmp_ott; @@ -743,7 +743,7 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i } tmp_ott->osd_length = xsize; tmp_ott->text_length = char_position; - tmp_ott->text = (int *) malloc(char_position * sizeof(int)); + tmp_ott->text = malloc(char_position * sizeof(int)); for (counter = 0; counter < char_position; ++counter) tmp_ott->text[counter] = char_seq[counter]; char_position = 0; @@ -773,7 +773,7 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i // osl holds an ordered (as they appear in the lines) chain of the subtitle words { - struct osd_text_t *tmp_ott = (struct osd_text_t *) calloc(1, sizeof(struct osd_text_t)); + struct osd_text_t *tmp_ott = calloc(1, sizeof(struct osd_text_t)); if (osl == NULL) { osl = cp_ott = tmp_ott; @@ -786,7 +786,7 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i } tmp_ott->osd_length = xsize; tmp_ott->text_length = char_position; - tmp_ott->text = (int *) malloc(char_position * sizeof(int)); + tmp_ott->text = malloc(char_position * sizeof(int)); for (counter = 0; counter < char_position; ++counter) tmp_ott->text[counter] = char_seq[counter]; char_position = 0; @@ -798,7 +798,7 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i int value = 0, exit = 0, minimum = 0; // otp will contain the chain of the osd subtitle lines coming from the single vo_sub line. - otp = tmp_otp = (struct osd_text_p *) calloc(1, sizeof(struct osd_text_p)); + otp = tmp_otp = calloc(1, sizeof(struct osd_text_p)); tmp_otp->ott = osl; for (tmp_ott = tmp_otp->ott; exit == 0; ) { do { @@ -806,7 +806,7 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i tmp_ott = tmp_ott->next; } while ((tmp_ott != NULL) && (value + tmp_ott->osd_kerning + tmp_ott->osd_length <= xlimit)); if (tmp_ott != NULL) { - struct osd_text_p *tmp = (struct osd_text_p *) calloc(1, sizeof(struct osd_text_p)); + struct osd_text_p *tmp = calloc(1, sizeof(struct osd_text_p)); tmp_otp->value = value; tmp_otp->next = tmp; diff --git a/libvo/video_out.c b/libvo/video_out.c index f8d857dfc5..31f7ea3dec 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -177,17 +177,16 @@ const struct vo_driver *video_out_drivers[] = #ifdef CONFIG_XV &video_out_xv, #endif +#ifdef CONFIG_GL + &video_out_gl, +#endif #ifdef CONFIG_X11 &video_out_x11, &video_out_xover, #endif #ifdef CONFIG_GL - &video_out_gl, &video_out_gl2, #endif -#ifdef CONFIG_MATRIXVIEW - &video_out_matrixview, -#endif #ifdef CONFIG_DGA &video_out_dga, #endif @@ -204,6 +203,9 @@ const struct vo_driver *video_out_drivers[] = #ifdef CONFIG_SVGALIB &video_out_svga, #endif +#ifdef CONFIG_MATRIXVIEW + &video_out_matrixview, +#endif #ifdef CONFIG_AA &video_out_aa, #endif @@ -590,7 +592,7 @@ range_t *str2range(char *s) for (i = 0; *endptr; i++) { if (*s == ',') goto out_err; - if (!(r = (range_t *) realloc(r, sizeof(*r) * (i + 2)))) { + if (!(r = realloc(r, sizeof(*r) * (i + 2)))) { mp_msg(MSGT_GLOBAL, MSGL_WARN,"can't realloc 'r'\n"); return NULL; } diff --git a/libvo/vo_fbdev2.c b/libvo/vo_fbdev2.c index c44a216b75..491911ad6c 100644 --- a/libvo/vo_fbdev2.c +++ b/libvo/vo_fbdev2.c @@ -300,7 +300,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, ( (out_height - in_height) / 2 ) * fb_line_len; #ifndef USE_CONVERT2FB - if (!(next_frame = (uint8_t *) realloc(next_frame, in_width * in_height * fb_pixel_size))) { + if (!(next_frame = realloc(next_frame, in_width * in_height * fb_pixel_size))) { mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't malloc next_frame: %s\n", strerror(errno)); return 1; } |