i'm developing a video server in C on GNU/Linux, and i'm using ffmpeg to manage data of each video file. So, i open the file, get all the information about its container, then do the same with its codec and start reading frames one by one.

Unfortunately, ffmpeg and more precisely avcodec is not very well documented. I need to know when a frame is an I-Frame or a B-Frame to maintain a record, so how could i do it?

Thanks in advance.