projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17adeaa
)
Don't crash if the descriptor's sampling rate denominator is 0.
author
Carl Hetherington
<cth@carlh.net>
Fri, 17 Feb 2023 20:27:28 +0000
(21:27 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 17 Feb 2023 20:27:28 +0000
(21:27 +0100)
src/sound_asset.cc
patch
|
blob
|
history
diff --git
a/src/sound_asset.cc
b/src/sound_asset.cc
index 0eaa8fb50f69269c66b86b37e428a4f0e0368707..e24aced20a27252efb8caabd74d036be53b13ef4 100644
(file)
--- a/
src/sound_asset.cc
+++ b/
src/sound_asset.cc
@@
-78,7
+78,7
@@
SoundAsset::SoundAsset (boost::filesystem::path file)
boost::throw_exception (ReadError("could not read audio MXF information"));
}
- _sampling_rate = desc.AudioSamplingRate.
Numerator / desc.AudioSamplingRate.Denominator
;
+ _sampling_rate = desc.AudioSamplingRate.
Denominator ? (desc.AudioSamplingRate.Numerator / desc.AudioSamplingRate.Denominator) : 0
;
_channels = desc.ChannelCount;
_edit_rate = Fraction (desc.EditRate.Numerator, desc.EditRate.Denominator);