[MPlayer-cvslog] r25872 - trunk/mplayer.c
reimar
subversion at mplayerhq.hu
Sun Jan 27 00:47:25 CET 2008
Author: reimar
Date: Sun Jan 27 00:47:25 2008
New Revision: 25872
Log:
Support vobsub palette in extradata, as exported by libavformat
Modified:
trunk/mplayer.c
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c (original)
+++ trunk/mplayer.c Sun Jan 27 00:47:25 2008
@@ -49,6 +49,8 @@
#include "cfg-mplayer-def.h"
+#include "libavutil/intreadwrite.h"
+
#include "subreader.h"
#include "libvo/video_out.h"
@@ -1119,6 +1121,12 @@ void init_vo_spudec(void) {
if (vo_spudec==NULL) {
sh_sub_t *sh = (sh_sub_t *)mpctx->d_sub->sh;
unsigned int *palette = NULL;
+ if (sh && !sh->has_palette && sh->extradata_len == 16*4) {
+ int i;
+ for (i = 0; i < 16; i++)
+ sh->palette[i] = AV_RB32(sh->extradata + i*4);
+ sh->has_palette = 1;
+ }
if (sh && sh->has_palette)
palette = sh->palette;
current_module="spudec_init_normal";
More information about the MPlayer-cvslog
mailing list