diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-03 22:58:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-03 22:58:46 +0100 |
| commit | 82926443230084739cb673a83b2ab1f9d733a07b (patch) | |
| tree | 72ff6a2564bc5950f52730b9d00151a5ebbbe00f /src/lib/ffmpeg_content.cc | |
| parent | 5ff10668facca32723efae3f08dfaab8a3d8bd44 (diff) | |
All audio content should resample if the output frame rate and content
frame rates differ; make Sndfile sources use the video-frame-rate-based
calculation for output frame rate (like FFmpeg sources do). Also, fix
small problems when flushing Resamplers used to get fed back to
Resamplers again.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 41a3724a2..4ea6dbc6a 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -309,30 +309,6 @@ FFmpegContent::content_audio_frame_rate () const return _audio_stream->frame_rate; } -int -FFmpegContent::output_audio_frame_rate () const -{ - shared_ptr<const Film> film = _film.lock (); - assert (film); - - /* Resample to a DCI-approved sample rate */ - double t = dcp_audio_frame_rate (content_audio_frame_rate ()); - - FrameRateConversion frc (video_frame_rate(), film->video_frame_rate()); - - /* Compensate if the DCP is being run at a different frame rate - to the source; that is, if the video is run such that it will - look different in the DCP compared to the source (slower or faster). - skip/repeat doesn't come into effect here. - */ - - if (frc.change_speed) { - t *= video_frame_rate() * frc.factor() / film->video_frame_rate(); - } - - return rint (t); -} - bool operator== (FFmpegStream const & a, FFmpegStream const & b) { |
