When using the C API for the encoder, the enc_buf structure in the
encoder handle needs to be set prior to every call to
dirac_encoder_output, even if the previous call to
dirac_encoder_output didn't return encoded data (eg. it returns
Although the API docs mention that the enc_buf structure should be
set up prior to such calls, the above requirement is not explicit. The
reasoning given in the docs can be read to imply that you only need
to set it up once, until the next time ENC_STATE_AVAIL is returned.
Either the docs could be more explicit, or the API could be changed
to not corrupt enc_buf if ENC_STATE_BUFFER is returned.
Log in to post a comment.