diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-08 19:09:46 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-08 19:09:46 +0000 |
| commit | 3190fb98298ebdd29c41b2cf6019a381e71a6248 (patch) | |
| tree | c92a2332400ac7e38e5f30fe0497796866955cce /src/lib/ffmpeg_content.cc | |
| parent | 04bfeac6ccfe4e4c981a241f53138c765a0864a7 (diff) | |
Name audio analyses with stream ID so that you can see analyses
for different streams correctly.
Reported-by: Markus Raab
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 4ae5546c2..47fe4f807 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -477,3 +477,23 @@ FFmpegContent::identifier () const return s.str (); } +boost::filesystem::path +FFmpegContent::audio_analysis_path () const +{ + shared_ptr<const Film> film = _film.lock (); + if (!film) { + return boost::filesystem::path (); + } + + /* We need to include the stream ID in this path so that we get different + analyses for each stream. + */ + + boost::filesystem::path p = film->audio_analysis_dir (); + string name = digest (); + if (audio_stream ()) { + name += "_" + audio_stream()->identifier (); + } + p /= name; + return p; +} |
