You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed a rounding error on mapping audio samples to frames. Also adjusted the sample rate on the frame.Play() method to 48khz.
This commit is contained in:
@@ -705,7 +705,7 @@ audio_packet_location FFmpegReader::GetAudioPTSLocation(int pts)
|
||||
|
||||
// Get Samples per frame
|
||||
int samples_per_frame = GetSamplesPerFrame();
|
||||
int sample_start = double(samples_per_frame) * sample_start_percentage;
|
||||
int sample_start = round(double(samples_per_frame) * sample_start_percentage);
|
||||
|
||||
// Prepare final audio packet location
|
||||
audio_packet_location location = {whole_frame, sample_start};
|
||||
|
||||
Reference in New Issue
Block a user