Set the audio 'original duration' during initial events parsing
This is the point at which the start/stop events for the audio are correctly matched up with eachother; doing it later can give incorrect results if an 'end recording' event was missing from the events file.
This commit is contained in:
parent
3c28f36786
commit
48735ccc70
@ -237,6 +237,7 @@ module BigBlueButton
|
||||
filename = event.at_xpath('filename').text
|
||||
filename = "#{audio_dir}/#{File.basename(filename)}"
|
||||
if audio_edl.last[:audio] && audio_edl.last[:audio][:filename] == filename
|
||||
audio_edl.last[:original_duration] = timestamp - audio_edl.last[:timestamp]
|
||||
audio_edl << {
|
||||
:timestamp => timestamp,
|
||||
:audio => nil
|
||||
|
@ -339,8 +339,6 @@ module BigBlueButton
|
||||
else
|
||||
edl_entry[:duration] = edl[i+1][:timestamp] - edl_entry[:timestamp]
|
||||
end
|
||||
# the original_duration is used to calculate the speed of the output file
|
||||
edl_entry[:original_duration] = edl_entry[:duration]
|
||||
end
|
||||
|
||||
BigBlueButton.logger.debug "edl with duration:\n#{BigBlueButton.hash_to_str(edl)}"
|
||||
|
Loading…
Reference in New Issue
Block a user