Skip to content

How to handle AVERROR(EAGAIN) #21

Description

@peteryang023

I meet a problem while calling avcodec_receive_packet to encode png bytes into H264, it returns AVERROR(EAGAIN) in the first 10s, from the comment, it mentions that:
0 on success, otherwise negative error code: AVERROR(EAGAIN): output is not available in the current state - user must try to send input AVERROR_EOF: the encoder has been fully flushed, and there will be no more output packets AVERROR(EINVAL): codec not opened, or it is a decoder other errors: legitimate encoding errors
I want to know how to clear the buffer while returning errors. How to send AVERROR_EOF?

Activity

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