Mercurial > mplayer.hg
diff libmpdemux/demux_mkv.c @ 25298:23894348d1e5
Convert vobsub custom colors from rgb to yuv using a common function.
author | ulion |
---|---|
date | Sun, 09 Dec 2007 06:58:57 +0000 |
parents | a6a49a7a4be0 |
children | fb719ee583b5 |
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c Sat Dec 08 23:21:08 2007 +0000 +++ b/libmpdemux/demux_mkv.c Sun Dec 09 06:58:57 2007 +0000 @@ -356,13 +356,15 @@ use_custom_colors ? "ON" : "OFF"); if ((start = strstr(start, "colors:")) != NULL) { + unsigned int tmp; start += 7; while (isspace(*start)) start++; for (i = 0; i < 4; i++) { - if (sscanf(start, "%06x", &sh->colors[i]) != 1) + if (sscanf(start, "%06x", &tmp) != 1) break; + sh->colors[i] = vobsub_rgb_to_yuv(tmp); start += 6; while ((*start == ',') || isspace(*start)) start++;