- _picture_asset->set_size (_film->frame_size ());
-
- if (_film->encrypted ()) {
- _picture_asset->set_key (_film->key ());
- }
-
- _picture_asset->set_file (
- _film->internal_video_asset_dir() / _film->internal_video_asset_filename()
- );
-
- job->sub (_("Checking existing image data"));
- check_existing_picture_asset ();
-
- _picture_asset_writer = _picture_asset->start_write (
- _film->internal_video_asset_dir() / _film->internal_video_asset_filename(),
- _film->interop() ? dcp::INTEROP : dcp::SMPTE,
- _first_nonexistant_frame > 0
- );
-
- if (_film->audio_channels ()) {
- _sound_asset.reset (
- new dcp::SoundAsset (dcp::Fraction (_film->video_frame_rate(), 1), _film->audio_frame_rate (), _film->audio_channels ())
- );
-
- if (_film->encrypted ()) {
- _sound_asset->set_key (_film->key ());
- }
-
- /* Write the sound asset into the film directory so that we leave the creation
- of the DCP directory until the last minute.
- */
- _sound_asset_writer = _sound_asset->start_write (
- _film->directory() / audio_asset_filename (_sound_asset),
- _film->interop() ? dcp::INTEROP : dcp::SMPTE
- );
- }
+ /* We can keep track of the current audio and subtitle reels easily because audio
+ and subs arrive to the Writer in sequence. This is not so for video.
+ */
+ _audio_reel = _reels.begin ();
+ _subtitle_reel = _reels.begin ();