Skip to content

How to handle AVERROR(EAGAIN) #21

@peteryang023

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?

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