lavf/utils: avoid using programs for duration when there's only one