Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable first frame to start at 0 #625

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eloisebrosseau
Copy link
Contributor

Enable first frame to start at 0

Summarize your change.

If there is no timecode, the first frame will be 0 or the value calculated from the start_time field of the AVFormatContext. The offset is also adjusted to be at least 0 to prevent it from being negative.

Describe the reason for the change.

In RV, if the media has no timecode, the first frame was being set to 1 if the start_time field of the AVFormatContext is 0. However, this was preventing the frame to be set to 0 to match the timeline of the Review App. The offset was also being set to a negative value when the first frame was set to 0.

Describe what you have tested and on which operating system.

I manually tested a few movie files with different timecode and without any in RV with and without Live Review on MacOS.

Add a list of changes, and note any that might need special attention during the review.

static_cast<double>(m_avFormatContext->start_time) / static_cast<double>(AV_TIME_BASE)));
if (evStartFrameAtOne.getValue())
{
firstFrame = max(int64_t(m_formatStartFrame), int64_t(1));
Copy link
Contributor

@bernie-laberge bernie-laberge Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I am wrong but the m_formatStartFrame is no longer initialized right ? (with or without the new env var)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants