[MPlayer-cvslog] r31702 - trunk/spudec.c

reimar subversion at mplayerhq.hu
Sun Jul 11 14:48:55 CEST 2010


Author: reimar
Date: Sun Jul 11 14:48:54 2010
New Revision: 31702

Log:
Remove useless casts

Modified:
   trunk/spudec.c

Modified: trunk/spudec.c
==============================================================================
--- trunk/spudec.c	Sun Jul 11 14:46:12 2010	(r31701)
+++ trunk/spudec.c	Sun Jul 11 14:48:54 2010	(r31702)
@@ -533,13 +533,13 @@ static void spudec_decode(spudec_handle_
 
 int spudec_changed(void * this)
 {
-    spudec_handle_t * spu = (spudec_handle_t*)this;
+    spudec_handle_t * spu = this;
     return spu->spu_changed || spu->now_pts > spu->end_pts;
 }
 
 void spudec_assemble(void *this, unsigned char *packet, unsigned int len, int pts100)
 {
-  spudec_handle_t *spu = (spudec_handle_t*)this;
+  spudec_handle_t *spu = this;
 //  spudec_heartbeat(this, pts100);
   if (len < 2) {
       mp_msg(MSGT_SPUDEC,MSGL_WARN,"SPUasm: packet too short\n");
@@ -613,7 +613,7 @@ void spudec_assemble(void *this, unsigne
 
 void spudec_reset(void *this)	// called after seek
 {
-  spudec_handle_t *spu = (spudec_handle_t*)this;
+  spudec_handle_t *spu = this;
   while (spu->queue_head)
     spudec_free_packet(spudec_dequeue_packet(spu));
   spu->now_pts = 0;
@@ -623,7 +623,7 @@ void spudec_reset(void *this)	// called 
 
 void spudec_heartbeat(void *this, unsigned int pts100)
 {
-  spudec_handle_t *spu = (spudec_handle_t*) this;
+  spudec_handle_t *spu = this;
   spu->now_pts = pts100;
 
   // TODO: detect and handle broken timestamps (e.g. due to wrapping)
@@ -657,7 +657,7 @@ void spudec_heartbeat(void *this, unsign
 }
 
 int spudec_visible(void *this){
-    spudec_handle_t *spu = (spudec_handle_t *)this;
+    spudec_handle_t *spu = this;
     int ret=(spu->start_pts <= spu->now_pts &&
 	     spu->now_pts < spu->end_pts &&
 	     spu->height > 0);
@@ -675,7 +675,7 @@ void spudec_set_forced_subs_only(void * 
 
 void spudec_draw(void *this, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride))
 {
-    spudec_handle_t *spu = (spudec_handle_t *)this;
+    spudec_handle_t *spu = this;
     if (spudec_visible(spu))
     {
 	draw_alpha(spu->start_col, spu->start_row, spu->width, spu->height,
@@ -687,8 +687,7 @@ void spudec_draw(void *this, void (*draw
 /* calc the bbox for spudec subs */
 void spudec_calc_bbox(void *me, unsigned int dxs, unsigned int dys, unsigned int* bbox)
 {
-  spudec_handle_t *spu;
-  spu = (spudec_handle_t *)me;
+  spudec_handle_t *spu = me;
   if (spu->orig_frame_width == 0 || spu->orig_frame_height == 0
   || (spu->orig_frame_width == dxs && spu->orig_frame_height == dys)) {
     // unscaled
@@ -822,7 +821,7 @@ static void sws_spu_image(unsigned char 
 
 void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride))
 {
-  spudec_handle_t *spu = (spudec_handle_t *)me;
+  spudec_handle_t *spu = me;
   scale_pixel *table_x;
   scale_pixel *table_y;
 
@@ -1153,7 +1152,7 @@ nothing_to_do:
 
 void spudec_update_palette(void * this, unsigned int *palette)
 {
-  spudec_handle_t *spu = (spudec_handle_t *) this;
+  spudec_handle_t *spu = this;
   if (spu && palette) {
     memcpy(spu->global_palette, palette, sizeof(spu->global_palette));
     if(spu->hw_spu)
@@ -1163,7 +1162,7 @@ void spudec_update_palette(void * this, 
 
 void spudec_set_font_factor(void * this, double factor)
 {
-  spudec_handle_t *spu = (spudec_handle_t *) this;
+  spudec_handle_t *spu = this;
   spu->font_start_level = (int)(0xF0-(0xE0*factor));
 }
 
@@ -1257,7 +1256,7 @@ void *spudec_new(unsigned int *palette)
 
 void spudec_free(void *this)
 {
-  spudec_handle_t *spu = (spudec_handle_t*)this;
+  spudec_handle_t *spu = this;
   if (spu) {
     while (spu->queue_head)
       spudec_free_packet(spudec_dequeue_packet(spu));
@@ -1273,7 +1272,7 @@ void spudec_free(void *this)
 
 void spudec_set_hw_spu(void *this, const vo_functions_t *hw_spu)
 {
-  spudec_handle_t *spu = (spudec_handle_t*)this;
+  spudec_handle_t *spu = this;
   if (!spu)
     return;
   spu->hw_spu = hw_spu;


More information about the MPlayer-cvslog mailing list