Rich Felker wrote: > If you enable edge emulation (which also makes decoding faster) then > linesize will be equal to width as long as width is a multiple of 16, > but you should not rely on this to be the case. CODEC_FLAG_EMU_EDGE solved the problem. It's not something I would have found anywhere. Thanks for the tip. Paul