Re: [AD] patch for the FLC reader

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> The extra byte isn't counted in the chunk size (each chunk has a
> header with size/type, and the size doesn't count the alignment byte),

Ah! ok, thanks for the clarification.

> but this alignment byte IS COUNTED in the frame size, that is why the
> Allegro player (after an odd chunk) works anyway (because jump the
> frame size that contains that extra byte).

Do you mean that it skips the remaining chunks in the frame, after an 
odd-sized chunk has been encountered?

Your patch makes sense (and it has a visible effect on the testcases, thanks 
for providing them) so I'll apply on both branches.  However, don't you 
need to additionally decrement 'frame_size' for an odd-sized chunk?  And does 
this mean that the following lines

      if (c == frame_header.chunks-1)
	 sz += frame_size;

would be obsoleted?

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/