Skip to content

Change FFmpegChapter#id type to long#310

Merged
bramp merged 1 commit intobramp:masterfrom
Euklios:feature/296-FFmpegChapter_id_needs_to_be_a_long
Mar 10, 2024
Merged

Change FFmpegChapter#id type to long#310
bramp merged 1 commit intobramp:masterfrom
Euklios:feature/296-FFmpegChapter_id_needs_to_be_a_long

Conversation

@Euklios
Copy link
Copy Markdown
Collaborator

@Euklios Euklios commented Mar 9, 2024

This closes #296.

The data provided in the issue is sadly not complete, but using an existing file and adding the chapter information I could re-create a minimal test to accompany the fix


assertThat(info.getChapters().get(0).id, is(6613449456311024506L));
assertThat(info.getChapters().get(1).id, is(-4433436293284298339L));
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Are chapter IDs allowed to be negative?

Copy link
Copy Markdown
Collaborator Author

@Euklios Euklios Mar 10, 2024

Choose a reason for hiding this comment

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

Very good question, I just checked in the ffmpeg source.
They use int64_t, which is 64bit signed, so type long and negative values are supported.

I'm not sure, if ffmpeg itself will produce negative numbers, might be compatibility with other software.

Edit:
FFmpeg AVChapter

Copy link
Copy Markdown
Owner

@bramp bramp left a comment

Choose a reason for hiding this comment

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

Looks great, thanks. Just one question before I merge.

@bramp bramp merged commit bb52097 into bramp:master Mar 10, 2024
@Euklios Euklios deleted the feature/296-FFmpegChapter_id_needs_to_be_a_long branch March 11, 2024 20:51
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.

FFmpegChapter id needs to be a long

2 participants