Fix incorrect alpha step used for RGBA64 sources.
[dcpomatic.git] / src / lib / dcp_decoder.cc
index c1f025d809bf9760b350098ef360495ecd6d50dc..24ff507e687ba43f5918e3bb4986e9fc979dbbf8 100644 (file)
@@ -314,7 +314,11 @@ DCPDecoder::pass_texts (
                                }
 
                                dcp::SubtitleString is_copy = *is;
-                               is_copy.set_font(_font_id_allocator.font_id(_reel - _reels.begin(), asset->id(), is_copy.font().get_value_or("")));
+                               if (is_copy.font()) {
+                                       is_copy.set_font(_font_id_allocator.font_id(_reel - _reels.begin(), asset->id(), is_copy.font().get()));
+                               } else {
+                                       is_copy.set_font(_font_id_allocator.default_font_id());
+                               }
                                strings.push_back(is_copy);
                        }
 
@@ -447,10 +451,12 @@ DCPDecoder::seek (ContentTime t, bool accurate)
 
        /* Pass texts in the pre-roll */
 
-       auto const vfr = _dcp_content->active_video_frame_rate (film());
-       for (int i = 0; i < pre_roll_seconds * vfr; ++i) {
-               pass_texts (pre, (*_reel)->main_picture()->asset()->size());
-               pre += ContentTime::from_frames (1, vfr);
+       if (_reel != _reels.end()) {
+               auto const vfr = _dcp_content->active_video_frame_rate (film());
+               for (int i = 0; i < pre_roll_seconds * vfr; ++i) {
+                       pass_texts (pre, (*_reel)->main_picture()->asset()->size());
+                       pre += ContentTime::from_frames (1, vfr);
+               }
        }
 
        /* Seek to correct position */