changeset 31969:b2fb8e656eca

Remove useless casts.
author reimar
date Mon, 06 Sep 2010 19:36:47 +0000
parents 5c9310a4d2e9
children 7779efdd10a7
files vobsub.c
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/vobsub.c	Mon Sep 06 14:42:25 2010 +0000
+++ b/vobsub.c	Mon Sep 06 19:36:47 2010 +0000
@@ -876,7 +876,7 @@
                      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_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 @@
 
 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_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 @@
 
 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_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 @@
 
 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_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_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 @@
 {
     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];