[MPlayer-cvslog] r32053 - trunk/vobsub.c

reimar subversion at mplayerhq.hu
Mon Sep 6 21:36:47 CEST 2010


Author: reimar
Date: Mon Sep  6 21:36:47 2010
New Revision: 32053

Log:
Remove useless casts.

Modified:
   trunk/vobsub.c

Modified: trunk/vobsub.c
==============================================================================
--- trunk/vobsub.c	Mon Sep  6 16:42:25 2010	(r32052)
+++ trunk/vobsub.c	Mon Sep  6 21:36:47 2010	(r32053)
@@ -876,7 +876,7 @@ int vobsub_parse_ifo(void* this, const c
                      unsigned int *width, unsigned int *height, int force,
                      int sid, char *langid)
 {
-    vobsub_t *vob = (vobsub_t*)this;
+    vobsub_t *vob = this;
     int res = -1;
     rar_stream_t *fd = rar_open(name, "rb");
     if (fd == NULL) {
@@ -1068,7 +1068,7 @@ void *vobsub_open(const char *const name
 
 void vobsub_close(void *this)
 {
-    vobsub_t *vob = (vobsub_t *)this;
+    vobsub_t *vob = this;
     if (vob->spu_streams) {
         while (vob->spu_streams_size--)
             packet_queue_destroy(vob->spu_streams + vob->spu_streams_size);
@@ -1079,13 +1079,13 @@ void vobsub_close(void *this)
 
 unsigned int vobsub_get_indexes_count(void *vobhandle)
 {
-    vobsub_t *vob = (vobsub_t *) vobhandle;
+    vobsub_t *vob = vobhandle;
     return vob->spu_valid_streams_size;
 }
 
 char *vobsub_get_id(void *vobhandle, unsigned int index)
 {
-    vobsub_t *vob = (vobsub_t *) vobhandle;
+    vobsub_t *vob = vobhandle;
     return (index < vob->spu_streams_size) ? vob->spu_streams[index].id : NULL;
 }
 
@@ -1121,7 +1121,7 @@ int vobsub_get_index_by_id(void *vobhand
 int vobsub_set_from_lang(void *vobhandle, unsigned char * lang)
 {
     int i;
-    vobsub_t *vob= (vobsub_t *) vobhandle;
+    vobsub_t *vob= vobhandle;
     while (lang && strlen(lang) >= 2) {
         for (i = 0; i < vob->spu_streams_size; i++)
             if (vob->spu_streams[i].id)
@@ -1170,7 +1170,7 @@ static void vobsub_queue_reseek(packet_q
 
 int vobsub_get_packet(void *vobhandle, float pts, void** data, int* timestamp)
 {
-    vobsub_t *vob = (vobsub_t *)vobhandle;
+    vobsub_t *vob = vobhandle;
     unsigned int pts100 = 90000 * pts;
     if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {
         packet_queue_t *queue = vob->spu_streams + vobsub_id;
@@ -1196,7 +1196,7 @@ int vobsub_get_packet(void *vobhandle, f
 
 int vobsub_get_next_packet(void *vobhandle, void** data, int* timestamp)
 {
-    vobsub_t *vob = (vobsub_t *)vobhandle;
+    vobsub_t *vob = vobhandle;
     if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {
         packet_queue_t *queue = vob->spu_streams + vobsub_id;
         if (queue->current_index < queue->packets_size) {
@@ -1212,7 +1212,7 @@ int vobsub_get_next_packet(void *vobhand
 
 void vobsub_seek(void * vobhandle, float pts)
 {
-    vobsub_t * vob = (vobsub_t *)vobhandle;
+    vobsub_t * vob = vobhandle;
     packet_queue_t * queue;
     int seek_pts100 = pts * 90000;
 
@@ -1228,7 +1228,7 @@ void vobsub_seek(void * vobhandle, float
 
 void vobsub_reset(void *vobhandle)
 {
-    vobsub_t *vob = (vobsub_t *)vobhandle;
+    vobsub_t *vob = vobhandle;
     if (vob->spu_streams) {
         unsigned int n = vob->spu_streams_size;
         while (n-- > 0)
@@ -1317,7 +1317,7 @@ void *vobsub_out_open(const char *basena
 
 void vobsub_out_close(void *me)
 {
-    vobsub_out_t *vob = (vobsub_out_t*)me;
+    vobsub_out_t *vob = me;
     if (vob->fidx)
         fclose(vob->fidx);
     if (vob->fsub)
@@ -1330,7 +1330,7 @@ void vobsub_out_output(void *me, const u
 {
     static double last_pts;
     static int last_pts_set = 0;
-    vobsub_out_t *vob = (vobsub_out_t*)me;
+    vobsub_out_t *vob = me;
     if (vob->fsub) {
         /*  Windows' Vobsub require that every packet is exactly 2kB long */
         unsigned char buffer[2048];


More information about the MPlayer-cvslog mailing list