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 <https://ffmpeg.org/doxygen/4.0/group__lavc__decoding.html#ga58bc4bf1e0ac59e27362597e467efff3>(dec_ctx, pkt) >= 0) { //should i put another while loop here to decode frames in packet.? ret = avcodec_receive_frame <https://ffmpeg.org/doxygen/4.0/group__lavc__decoding.html#ga11e6542c4e66d3028668788a1a74217c>(dec_ctx, frame); if (ret == AVERROR <https://ffmpeg.org/doxygen/4.0/group__lavu__error.html#gae4bb6f165973d09584e0ec0f335f69ca>(EAGAIN) || ret == AVERROR_EOF <https://ffmpeg.org/doxygen/4.0/group__lavu__error.html#gab4faa0afdf35076914824200331defff> ) return; else if (ret < 0) { fprintf(stderr, "Error during decoding\n"); exit(1); } }
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
