ffmpeg: Use input packet duration in vfr/cfr code if available and valid

Fixes Ticket3052
ffmpeg: Check duration for overlap and clip in fps cfr/vfr code

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