You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Improved detection of missing audio frames, and missing video frames. Also improved logic for giving up on missing frames in general. Also removed some deadlocks related to Seeking (Close() and Open() were deadlocking). The end result is much improved compatability with reading video files.
This commit is contained in:
@@ -430,8 +430,10 @@ int64 Frame::GetBytes()
|
||||
int64 total_bytes = 0;
|
||||
if (image)
|
||||
total_bytes += (width * height * sizeof(char) * 4);
|
||||
if (audio)
|
||||
total_bytes += (audio->getNumSamples() * audio->getNumChannels() * sizeof(float));
|
||||
if (audio) {
|
||||
// approximate audio size (sample rate / 24 fps)
|
||||
total_bytes += (sample_rate / 24.0) * sizeof(float);
|
||||
}
|
||||
|
||||
// return size of this frame
|
||||
return total_bytes;
|
||||
|
||||
Reference in New Issue
Block a user