I'm a bit confused with decoding/encoding api. I've read this
<https://ffmpeg.org/doxygen/3.1/group__lavc__encdec.html> documentation and
it says "Receive output in a loop. Periodically call one of the
avcodec_receive_*()...".
avcodec_receive_frame() docs say "the function will always call
av_frame_unref(frame) before doing anything else." The same goes for
avcodec_receive_packet().
So, for example, I will write such code:
AVCodecContext *codecContext;
AVPacket *packet;
AVFrame *frame;
// allocating codec context, getting packet
.................................
//
avcodec_send_packet(codecContext, packet);
while(avcodec_receive_frame(codecContext, frame) == 0)
{
}
Will this code be functioning right?
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user