On 09/24/2016 09:40 PM, M N wrote:
> What error code for the 4 functions: avcodec_send_packet, 
> avcodec_receive_frame, avcodec_send_frame, avcodec_receive_packet, means I 
> should flush (End of stream situation)? And can someone put a simple example 
> to show us how flushing is done?

Flushing is an action done by you. When your video encoding/decoding job is 
done (you're at the end of the input) you
begin flushing.

Many codecs will read multiple AVFrames before they begin outputting AVPackets 
(or vice versa for decoders) for bitrate
calculation, out-of-order processing or other reasons. When you're finished 
with your video you flush the codec by
sending it a NULL AVFrame/Packet in which case all the buffered 
AVPacket/AVFrames you expect to receive will come out.

Maybe you mean the error code AVERROR(EAGAIN) which means that you've either 
over-filled the input or over-drained the
output. In over-filled input situation your input was not actually processed. 
See documentation in libavcodec/avcodec.h

> 
> Thanks in advance!
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user
> 

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to