projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3ae7939
)
Fix FFmpeg subtitle colour finding (#1393).
author
Carl Hetherington
<cth@carlh.net>
Sat, 26 Jan 2019 19:59:55 +0000
(19:59 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 26 Jan 2019 19:59:55 +0000
(19:59 +0000)
src/lib/examine_ffmpeg_subtitles_job.cc
patch
|
blob
|
history
diff --git
a/src/lib/examine_ffmpeg_subtitles_job.cc
b/src/lib/examine_ffmpeg_subtitles_job.cc
index dbd265ecaacd33d8e4251b29d196c05f636fb147..af548b7944529100d2d57e3ec925e85f6255f6e4 100644
(file)
--- a/
src/lib/examine_ffmpeg_subtitles_job.cc
+++ b/
src/lib/examine_ffmpeg_subtitles_job.cc
@@
-89,8
+89,10
@@
ExamineFFmpegSubtitlesJob::run ()
*/
uint32_t const * palette = (uint32_t *) rect->data[1];
#endif
- RGBA c ((palette[i] & 0xff0000) >> 16, (palette[i] & 0xff00) >> 8, palette[i] & 0xff, (palette[i] & 0xff000000) >> 24);
- _content->subtitle_stream()->set_colour (c, c);
+ for (int j = 0; j < rect->nb_colors; ++j) {
+ RGBA c ((palette[j] & 0xff0000) >> 16, (palette[j] & 0xff00) >> 8, palette[j] & 0xff, (palette[j] & 0xff000000) >> 24);
+ _content->subtitle_stream()->set_colour (c, c);
+ }
}
}
}