Fix crash on analysing audio (and possibly DCP creation) with resampled
authorCarl Hetherington <cth@carlh.net>
Fri, 27 Jun 2014 23:39:02 +0000 (00:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 27 Jun 2014 23:39:02 +0000 (00:39 +0100)
content.

Reported-by: Matthias Damm
ChangeLog
src/lib/player.cc

index a417575e5bf41be0b1c476923ea88e1888cd8d05..a8b91ec632394d3c8e0680e701a70e2f9fe5852a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-28  Carl Hetherington  <cth@carlh.net>
+
+       * Fix crash on analysing audio (and possibly DCP creation) with
+       resampled content.
+
 2014-06-27  Carl Hetherington  <cth@carlh.net>
 
        * Version 1.71.0 released.
index 7bf78c905248487e2e9d3723c38d267827e4a11b..2d2977606786097f6b827ec07a8048dd7c90da59 100644 (file)
@@ -150,7 +150,12 @@ Player::pass ()
                                if (re) {
                                        shared_ptr<const AudioBuffers> b = re->flush ();
                                        if (b->frames ()) {
-                                               process_audio (earliest, b, ac->audio_length (), true);
+                                               process_audio (
+                                                       earliest,
+                                                       b,
+                                                       ac->audio_length() * ac->output_audio_frame_rate() / ac->content_audio_frame_rate(),
+                                                       true
+                                                       );
                                        }
                                }
                        }