# HG changeset patch # User reimar # Date 1283801807 0 # Node ID b2fb8e656eca419ca98672762f2172c6f711d753 # Parent 5c9310a4d2e99b8c263d0c056ce37640a0050a7f Remove useless casts. diff -r 5c9310a4d2e9 -r b2fb8e656eca vobsub.c --- 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];