For example, you could try sending new input on each iteration, and try to receive output if that returns EAGAIN.Įnd of stream situations. You can use this to structure alternative decode or encode loops other than the one suggested above. In theory, sending input can result in EAGAIN - this should happen only if not all output was received. This situation is handled transparently if you follow the steps outlined above. For each input frame/packet, the codec will typically return 1 output frame/packet, but it can also be 0 or more than 1.Īt the beginning of decoding or encoding, the codec might accept multiple input frames/packets without returning a frame, until its internal buffers are filled. In this case, continue with sending input. The AVERROR(EAGAIN) return value means that new input data is required to return new output. ![]() Repeat this call until it returns AVERROR(EAGAIN) or an error. On success, it will return an AVPacket with a compressed frame.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |