Skip to content

Commit

Permalink
optimize seeking
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Jan 2, 2024
1 parent 9800075 commit ac49729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mediafx/video_track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ bool VideoTrack::initialize(FFMS_Index* index, const char* sourceFile, ErrorInfo
{
int videoTrackNum = FFMS_GetFirstTrackOfType(index, FFMS_TYPE_VIDEO, &errorInfo);
if (videoTrackNum >= 0) {
FFMS_VideoSource* videoSource = FFMS_CreateVideoSource(sourceFile, videoTrackNum, index, 1, FFMS_SEEK_LINEAR, &errorInfo);
FFMS_VideoSource* videoSource = FFMS_CreateVideoSource(sourceFile, videoTrackNum, index, 1, mediaClip()->clipStart() == 0 ? FFMS_SEEK_LINEAR_NO_RW : FFMS_SEEK_NORMAL, &errorInfo);
if (videoSource) {
const FFMS_Frame* frameProperties = FFMS_GetFrame(videoSource, 0, &errorInfo);
if (frameProperties) {
Expand Down

0 comments on commit ac49729

Please sign in to comment.