avidec: calculate missing bitrates from index

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/avidec: Check required demuxing buffer sizes in guess_ni_flag()

Fixes Ticket3421

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