8000 Incorrect Data Padding for Audio and Video Chunks · Issue #12 · rolinh/libgwavi · GitHub
[go: up one dir, main page]

Skip to content

Incorrect Data Padding for Audio and Video Chunks #12

Open

Description

@mjbudd77

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;

Activity

  1. mjbudd77 commented on Aug 29, 2021

    @mjbudd77
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0