Let's say that I can allocate my own buffers for the decoded frames, what about the frames used in the MpegEncContext structure (i.e. next_picture, prev_picture)? I really don't want to have to do lots of memcpy()s or rewrite the codec to use my own buffer allocation scheme :-) Cheers, Gaz.