| Summary: | FLAC plugin's function seekToFrame may not work properly | ||
|---|---|---|---|
| Product: | [Applications] k3b | Reporter: | Vitaliy <vitfunk> |
| Component: | Plugins | Assignee: | K3b Bugs <k3b-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | aacid, michalm, trueg |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | All | ||
| Latest Commit: | http://commits.kde.org/k3b/ef2ce428dc1607563273d1258f56d9083dcf99d4 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
What's the problem, is it overflowing? Yes, it is. Git commit ef2ce428dc1607563273d1258f56d9083dcf99d4 by Albert Astals Cid. Committed on 19/11/2014 at 21:50. Pushed by aacid into branch '2.0'. FLAC plugin's function seekToFrame may not work properly Patch by Vitaly <vitfunk@yandex.ru> M +1 -1 plugins/decoder/flac/k3bflacdecoder.cpp http://commits.kde.org/k3b/ef2ce428dc1607563273d1258f56d9083dcf99d4 |
Multiply in the function seekToFrame may cause loss of data: bool K3bFLACDecoder::Private::seekToFrame(int frame) { FLAC__uint64 sample = frame * rate / 75; return seek_absolute(sample); } Correct function: bool K3bFLACDecoder::Private::seekToFrame(int frame) { FLAC__uint64 sample = static_cast<FLAC__uint64>(frame) * rate / 75; return seek_absolute(sample); } Reproducible: Sometimes Steps to Reproduce: 1. Take the CD-Rip FLAC with CUE-sheet 2. Leave one random track from cd, remove other 3. Burn CD or make an image 4. Content of the track will different from the selected