projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e234776
)
Fix Playlist::has_audio().
author
Carl Hetherington
<cth@carlh.net>
Sun, 14 Apr 2013 13:24:07 +0000
(14:24 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 14 Apr 2013 13:24:07 +0000
(14:24 +0100)
src/lib/playlist.cc
patch
|
blob
|
history
diff --git
a/src/lib/playlist.cc
b/src/lib/playlist.cc
index 7fe4fb2a5496c00cb83562eb606f426461a0b011..f04bbe0cb13b608d1a07d3d297ec1cbc90987849 100644
(file)
--- a/
src/lib/playlist.cc
+++ b/
src/lib/playlist.cc
@@
-182,8
+182,18
@@
Playlist::video_length () const
bool
Playlist::has_audio () const
{
- /* XXX */
- return true;
+ if (!_sndfile.empty ()) {
+ return true;
+ }
+
+ for (list<shared_ptr<const VideoContent> >::const_iterator i = _video.begin(); i != _video.end(); ++i) {
+ shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (*i);
+ if (fc && fc->audio_stream ()) {
+ return true;
+ }
+ }
+
+ return false;
}
void