aviocat: Check the argv array length before reading element i+1

Signed-off-by: Martin Storsjö <martin@martin.st>
aviocat: Add support for specifying the input duration

This avoids the caller having to calculate the byte rate if wanting
to push a file in a rate resembling realtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '03f2de5856ec8571fcf5f4cf6dccc713294af545'

* commit '03f2de5856ec8571fcf5f4cf6dccc713294af545':
  aviocat: Check the argv array length before reading element i+1

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '87acd33c092ab9e7d73686627e9105d99c1e4928'

* commit '87acd33c092ab9e7d73686627e9105d99c1e4928':
  aviocat: Add support for specifying the input duration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fix libxvid crash on failing initialisation.

Fixes ticket #3297.