On Fri, Mar 11, 2011 at 12:50:27PM +0100, Peter Ross wrote: > + for (i = 0; i < AVPALETTE_COUNT && buf + 3 <= buf_end; i++) { > + s->palette[i] = AV_RB24(buf) << 2; > + buf += 3; > + } Shouldn't this rather use bytestream_get_le24?