Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / lib / examine_ffmpeg_subtitles_job.cc
index dbd265ecaacd33d8e4251b29d196c05f636fb147..af548b7944529100d2d57e3ec925e85f6255f6e4 100644 (file)
@@ -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);
+                                               }
                                        }
                                }
                        }