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

Incorrect Data Padding for Audio and Video Chunks #12

Open
mjbudd77 opened this issue Aug 29, 2021 · 1 comment
Open

Incorrect Data Padding for Audio and Video Chunks #12

mjbudd77 opened this issue Aug 29, 2021 · 1 comment

Comments

@mjbudd77
Copy link

Per microsoft AVI RIFF File Reference documentation: For chunk data blocks: The data is always padded to nearest WORD boundary. ckSize gives the size of the valid data in the chunk; it does not include the padding, the size of ckID, or the size of ckSize.
WORD data size 2 is bytes. gwavi.c Line 241 using a 4 byte pad. It should be 2. Also, the size of the pad is being added into the size of the chunk and it should not be.

maxi_pad = len % 4;

@mjbudd77
Copy link
Author

Here is where the size of the padding is incorrectly being added in to ckSize.

if (write_int(gwavi->out, (unsigned int)(len + maxi_pad)) == -1) {

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

No branches or pull requests

1 participant