Someone has programmed with libmpeg2?

If yes, you know about how it manage custom buffers? I don't understand, because there is no enought documentation! I've red source code also, but I'm a little confused...

If somebody can clarify me about this... I'll offer a good beer!