avformat: Make duration estimation from pts more robust

Ignore durations which differ significantly from the previous
Fixes Ticket2018

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