}
flush ();
- return;
+ return true;
}
- avcodec_get_frame_defaults (_frame);
-
shared_ptr<const Film> film = _film.lock ();
assert (film);
/* Subtitle PTS in seconds (within the source, not taking into account any of the
source that we may have chopped off for the DCP)
*/
++<<<<<<< HEAD
+ double const packet_time = (static_cast<double> (sub.pts ) / AV_TIME_BASE) + _pts_offset;
+
++=======
+ double const packet_time = (static_cast<double> (sub.pts ) / AV_TIME_BASE) + _video_pts_offset;
+
++>>>>>>> master
/* hence start time for this sub */
- Time const from = (packet_time + (double (sub.start_display_time) / 1e3)) * TIME_HZ;
- Time const to = (packet_time + (double (sub.end_display_time) / 1e3)) * TIME_HZ;
+ ContentTime const from = (packet_time + (double (sub.start_display_time) / 1e3)) * TIME_HZ;
+ ContentTime const to = (packet_time + (double (sub.end_display_time) / 1e3)) * TIME_HZ;
AVSubtitleRect const * rect = sub.rects[0];
true
);
++<<<<<<< HEAD
+ _out_subtitle.from = _in_subtitle.subtitle->dcp_time;
+ _out_subtitle.to = _in_subtitle.subtitle->dcp_time_to;
++=======
+ /* XXX: hack */
+ Time from = _in_subtitle.from;
+ Time to = _in_subtitle.to;
+ shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (piece->content);
+ if (vc) {
+ from = rint (from * vc->video_frame_rate() / _film->video_frame_rate());
+ to = rint (to * vc->video_frame_rate() / _film->video_frame_rate());
+ }
+
+ _out_subtitle.from = from * piece->content->position ();
+ _out_subtitle.to = to + piece->content->position ();
++>>>>>>> master
}
/** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles.