# HG changeset patch # User reimar # Date 1201391535 0 # Node ID ae814d807d407bf865f9cafd76db13ff00d711b3 # Parent 6b01c546c5c31ba8a31ba829ff5d32d56069e770 Simplify init_vobsub: pass palette via extradata. diff -r 6b01c546c5c3 -r ae814d807d40 libmpdemux/demux_mov.c --- a/libmpdemux/demux_mov.c Sat Jan 26 23:47:25 2008 +0000 +++ b/libmpdemux/demux_mov.c Sat Jan 26 23:52:15 2008 +0000 @@ -564,17 +564,12 @@ } static void init_vobsub(sh_sub_t *sh, mov_track_t *trak) { - int i; - uint8_t *pal = trak->stdata; sh->type = 'v'; if (trak->stdata_len < 106) return; - sh->has_palette = 1; - pal += 42; - for (i = 0; i < 16; i++) { - sh->palette[i] = BE_32(pal); - pal += 4; - } + sh->extradata_len = 16*4; + sh->extradata = malloc(sh->extradata_len); + memcpy(sh->extradata, trak->stdata + 42, sh->extradata_len); } static int lschunks_intrak(demuxer_t* demuxer, int level, unsigned int id,