Works only for flv, h263 and huffyuv decoders. Makes only one pass through the file (this should be changed to two passes) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>