{
SafeStringStream s;
- s << Content::identifier() << "_"
- << video->identifier() << "_"
- << subtitle->identifier();
+ s << Content::identifier();
+
+ if (video) {
+ s << "_" << video->identifier();
+ }
+
+ if (subtitle) {
+ s << "_" << subtitle->identifier();
+ }
boost::mutex::scoped_lock lm (_mutex);
FFmpegContent::ffmpeg_audio_streams () const
{
vector<shared_ptr<FFmpegAudioStream> > fa;
- BOOST_FOREACH (AudioStreamPtr i, audio->streams()) {
- fa.push_back (dynamic_pointer_cast<FFmpegAudioStream> (i));
+
+ if (audio) {
+ BOOST_FOREACH (AudioStreamPtr i, audio->streams()) {
+ fa.push_back (dynamic_pointer_cast<FFmpegAudioStream> (i));
+ }
}
+
return fa;
}
shared_ptr<Film> film = new_test_film ("4k_test");
film->set_name ("4k_test");
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
- c->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
film->set_resolution (RESOLUTION_4K);
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
film->set_container (Ratio::from_id ("185"));
film->examine_and_add_content (c);
wait_for_jobs ();
+ c->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
+
film->make_dcp ();
wait_for_jobs ();