You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Big update! Updating all "long int" frame number types to int64_t, so all 3 OSes will produce the same depth and precision on frame numbers. Also removing variable bitrate support temporarily, since it causes more problems than it solves.
This commit is contained in:
@@ -37,16 +37,16 @@ CacheBase::CacheBase() : max_bytes(0) {
|
||||
};
|
||||
|
||||
// Constructor that sets the max frames to cache
|
||||
CacheBase::CacheBase(long long int max_bytes) : max_bytes(max_bytes) {
|
||||
CacheBase::CacheBase(int64_t max_bytes) : max_bytes(max_bytes) {
|
||||
// Init the critical section
|
||||
cacheCriticalSection = new CriticalSection();
|
||||
};
|
||||
|
||||
// Set maximum bytes to a different amount based on a ReaderInfo struct
|
||||
void CacheBase::SetMaxBytesFromInfo(long int number_of_frames, int width, int height, int sample_rate, int channels)
|
||||
void CacheBase::SetMaxBytesFromInfo(int64_t number_of_frames, int width, int height, int sample_rate, int channels)
|
||||
{
|
||||
// n frames X height X width X 4 colors of chars X audio channels X 4 byte floats
|
||||
long long int bytes = number_of_frames * (height * width * 4 + (sample_rate * channels * 4));
|
||||
int64_t bytes = number_of_frames * (height * width * 4 + (sample_rate * channels * 4));
|
||||
SetMaxBytes(bytes);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user