mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 06:42:03 +00:00
Handle missing palettes in the info part of VobSubs in Matroska files correctly by giving mplayer a NULL pointer. This way it will use a default palette instead of black only. Patch by Csillag Kristof (fenwick () freemail ! hu)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14562 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8af443d7d8
commit
efd53eed61
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user