avformat/aviobuf: factorize buffer_size out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/aviobuf: optimize sequential backward seeking

This reduces the number of protocol seeks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>