You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Harden playback/cache path for malformed media and concurrent timeline updates
- Invalidate timeline cache on ApplyJsonDiff() clip insert (remove affected frame range). - Add lock in Timeline::ClearAllCache() for safe concurrent access. - Make VideoCacheThread cross-thread state safe (atomics + seek-state mutex). - Lock CacheMemory::Contains() to avoid races. - Handle malformed audio streams in FFmpegReader by disabling invalid audio and continuing video-only. - Add FPS/timebase safety fallbacks in FFmpeg frame/PTS math. - Guard Frame::GetSamplesPerFrame() against invalid inputs. - Add/adjust regression tests for cache invalidation and invalid rate handling.
This commit is contained in:
@@ -36,12 +36,12 @@ public:
|
||||
using VideoCacheThread::handleUserSeekWithPreroll;
|
||||
using VideoCacheThread::computePrerollFrames;
|
||||
|
||||
int64_t getLastCachedIndex() const { return last_cached_index; }
|
||||
void setLastCachedIndex(int64_t v) { last_cached_index = v; }
|
||||
void setPlayhead(int64_t v) { requested_display_frame = v; }
|
||||
void setMinFramesAhead(int64_t v) { min_frames_ahead = v; }
|
||||
void setLastDir(int d) { last_dir = d; }
|
||||
void forceUserSeekFlag() { userSeeked = true; }
|
||||
int64_t getLastCachedIndex() const { return last_cached_index.load(); }
|
||||
void setLastCachedIndex(int64_t v) { last_cached_index.store(v); }
|
||||
void setPlayhead(int64_t v) { requested_display_frame.store(v); }
|
||||
void setMinFramesAhead(int64_t v) { min_frames_ahead.store(v); }
|
||||
void setLastDir(int d) { last_dir.store(d); }
|
||||
void forceUserSeekFlag() { userSeeked.store(true); }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user