Improved support for missing frames and invalid PTS (which result in gaps and duplicate frames). Also changed frame number to larger data type, and did some code clean-up and refactoring. Less crashes, and more video support!

This commit is contained in:
Jonathan Thomas
2015-08-24 01:05:48 -05:00
parent 45f31bbabf
commit bfa050409c
54 changed files with 566 additions and 321 deletions

View File

@@ -123,7 +123,7 @@ void ChunkReader::load_json()
}
// Find the location of a frame in a chunk
ChunkLocation ChunkReader::find_chunk_frame(int requested_frame)
ChunkLocation ChunkReader::find_chunk_frame(long int requested_frame)
{
// Determine which chunk contains this frame.
int chunk_number = (requested_frame / chunk_size) + 1;
@@ -187,7 +187,7 @@ string ChunkReader::get_chunk_path(int chunk_number, string folder, string exten
}
// Get an openshot::Frame object for a specific frame number of this reader.
tr1::shared_ptr<Frame> ChunkReader::GetFrame(int requested_frame) throw(ReaderClosed, ChunkNotFound)
tr1::shared_ptr<Frame> ChunkReader::GetFrame(long int requested_frame) throw(ReaderClosed, ChunkNotFound)
{
// Determine what chunk contains this frame
ChunkLocation location = find_chunk_frame(requested_frame);