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>
avformat/mp3dec: optimize mp3_seek() for dir < 0

this minimizes the amount of protocol seeks and reading needed in that case

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