comparison vobsub.c @ 7780:9806d65986e4

Mplayer can switch between subtitles of different languages during playing by press 'j', based on a patch by <hephooey@fastmail.fm>.
author kmkaplan
date Thu, 17 Oct 2002 15:44:41 +0000
parents ad00ad5f25a9
children 3d6904cee13e
comparison
equal deleted inserted replaced
7779:f3166c864e9e 7780:9806d65986e4
1132 free(vob->spu_streams); 1132 free(vob->spu_streams);
1133 } 1133 }
1134 free(vob); 1134 free(vob);
1135 } 1135 }
1136 1136
1137 unsigned int
1138 vobsub_get_indexes_count(void *vobhandle)
1139 {
1140 vobsub_t *vob = (vobsub_t *) vobhandle;
1141 return vob->spu_streams_size;
1142 }
1143
1144 char *
1145 vobsub_get_id(void *vobhandle, unsigned int index)
1146 {
1147 vobsub_t *vob = (vobsub_t *) vobhandle;
1148 return (index < vob->spu_streams_size) ? vob->spu_streams[index].id : NULL;
1149 }
1150
1137 int 1151 int
1138 vobsub_get_packet(void *vobhandle, float pts,void** data, int* timestamp) { 1152 vobsub_get_packet(void *vobhandle, float pts,void** data, int* timestamp) {
1139 vobsub_t *vob = (vobsub_t *)vobhandle; 1153 vobsub_t *vob = (vobsub_t *)vobhandle;
1140 unsigned int pts100 = 90000 * pts; 1154 unsigned int pts100 = 90000 * pts;
1141 if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) { 1155 if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {