Use SafeStringStream instead of std::stringstream to try to fix random crashes on...
[dcpomatic.git] / src / lib / player.cc
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
+                                                       );
                                        }
                                }
                        }