FFmpegContent does not need audio_length().
[dcpomatic.git] / src / wx / content_properties_dialog.cc
index 45593fd5b84921982d4658e948d7c5d19a50762a..c212eb50a7665e4ed9d37ef16f4e02b9d067ea13 100644 (file)
@@ -23,6 +23,7 @@
 #include "lib/content.h"
 #include "lib/video_content.h"
 #include "lib/audio_content.h"
+#include "lib/single_stream_audio_content.h"
 #include <boost/algorithm/string.hpp>
 
 using std::string;
@@ -58,9 +59,13 @@ ContentPropertiesDialog::ContentPropertiesDialog (wxWindow* parent, shared_ptr<C
                        _("Audio channels"),
                        std_to_wx (raw_convert<string> (audio->audio_channels ()))
                        );
+       }
+
+       shared_ptr<SingleStreamAudioContent> single = dynamic_pointer_cast<SingleStreamAudioContent> (content);
+       if (single) {
                add_property (
                        _("Audio length"),
-                       std_to_wx (raw_convert<string> (audio->audio_length())) + " " + _("audio frames")
+                       std_to_wx (raw_convert<string> (single->audio_length())) + " " + _("audio frames")
                        );
        }