diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index f3350789c5..70c9bd9250 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -373,6 +373,7 @@ vobsub_parse_palette (mkv_track_t *t, const char *start) t->sh_sub.palette[11], t->sh_sub.palette[12], t->sh_sub.palette[13], t->sh_sub.palette[14], t->sh_sub.palette[15]); + t->sh_sub.has_palette = 1; return 2; } return 0; @@ -480,6 +481,7 @@ demux_mkv_parse_idx (mkv_track_t *t) memcpy(buf, t->private_data, t->private_size); buf[t->private_size] = 0; t->sh_sub.type = 'v'; + t->sh_sub.has_palette = 0; pos = buf; start = buf; diff --git a/libmpdemux/matroska.h b/libmpdemux/matroska.h index b2abdb5411..7b89857b11 100644 --- a/libmpdemux/matroska.h +++ b/libmpdemux/matroska.h @@ -59,6 +59,7 @@ typedef struct { char type; // t = text, v = VobSub + int has_palette; // If we have a valid palette unsigned int palette[16]; // for VobSubs int width, height; // for VobSubs int custom_colors; diff --git a/mplayer.c b/mplayer.c index 8ae9b90899..ae644c97cc 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3417,7 +3417,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) if (vo_spudec != NULL) spudec_free(vo_spudec); vo_spudec = - spudec_new_scaled_vobsub(mkv_sh_sub->palette, mkv_sh_sub->colors, + spudec_new_scaled_vobsub(mkv_sh_sub->has_palette ? mkv_sh_sub->palette : NULL, mkv_sh_sub->colors, mkv_sh_sub->custom_colors, mkv_sh_sub->width, mkv_sh_sub->height);