[Libav-user] Number of video frames per packet

Venkateswaran.S venketeswaran2015 at gmail.com
Thu Apr 4 10:47:00 EEST 2019

Hi all,

I wants to know that number of frames(AVFrame) in video packet (AVPacket).
I have tested this with some sample .mp4 and .mkv file format and got to
know that each AVPacket contains one AVFrame. Is it fixed.?

while (avcodec_send_packet
pkt) >= 0)
//should i put another while loop here to decode frames in packet.?
ret = avcodec_receive_frame
if (ret == AVERROR
|| ret == AVERROR_EOF
else if (ret < 0) {
fprintf(stderr, "Error during decoding\n");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190404/1498fa07/attachment.html>

More information about the Libav-user mailing list