Mercurial > mplayer.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
25297:949e15337e50 | 25298:23894348d1e5 |
---|---|
354 use_custom_colors = 0; | 354 use_custom_colors = 0; |
355 mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] VobSub custom colors: %s\n", | 355 mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] VobSub custom colors: %s\n", |
356 use_custom_colors ? "ON" : "OFF"); | 356 use_custom_colors ? "ON" : "OFF"); |
357 if ((start = strstr(start, "colors:")) != NULL) | 357 if ((start = strstr(start, "colors:")) != NULL) |
358 { | 358 { |
359 unsigned int tmp; | |
359 start += 7; | 360 start += 7; |
360 while (isspace(*start)) | 361 while (isspace(*start)) |
361 start++; | 362 start++; |
362 for (i = 0; i < 4; i++) | 363 for (i = 0; i < 4; i++) |
363 { | 364 { |
364 if (sscanf(start, "%06x", &sh->colors[i]) != 1) | 365 if (sscanf(start, "%06x", &tmp) != 1) |
365 break; | 366 break; |
367 sh->colors[i] = vobsub_rgb_to_yuv(tmp); | |
366 start += 6; | 368 start += 6; |
367 while ((*start == ',') || isspace(*start)) | 369 while ((*start == ',') || isspace(*start)) |
368 start++; | 370 start++; |
369 } | 371 } |
370 if (i == 4) | 372 if (i == 4) |